{"_id":"@audio/speech-formant","_rev":"2-7682d95d84a4b0f5ee70920646d9cfbf","name":"@audio/speech-formant","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.0":{"name":"@audio/speech-formant","version":"1.0.0","keywords":["audio","dsp","speech","formant"],"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","_id":"@audio/speech-formant@1.0.0","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"homepage":"https://github.com/audiojs/filter/tree/main/packages/speech-formant","bugs":{"url":"https://github.com/audiojs/filter/issues"},"dist":{"shasum":"a08cfe2bcf3dad96b3f212fde4b1560ef06497f8","tarball":"https://registry.npmjs.org/@audio/speech-formant/-/speech-formant-1.0.0.tgz","fileCount":3,"integrity":"sha512-OhQSwXLjSaoakp7Hn/brGNFkqn9yY27x9/ucOOQffoDT1g4zWkbbsy6Ui7DWUvdlLbfPPu3Jvk1OftqLt9sG7Q==","signatures":[{"sig":"MEYCIQC7UGkLh/p1KM2JGjYBAKklejhER6/Nyock5RVrVoQhmAIhAMDxyxwwbtvGyvJgNERaG2HW27rQwi+uXFUCwMBkkyVc","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":2742},"main":"formant.js","type":"module","types":"formant.d.ts","engines":{"node":">=18"},"exports":{".":"./formant.js","./package.json":"./package.json"},"gitHead":"df0c10910638b429ad2e246e6c0df608999d85cc","_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"repository":{"url":"git+https://github.com/audiojs/filter.git","type":"git","directory":"packages/speech-formant"},"_npmVersion":"11.12.1","description":"Parallel formant filter bank","directories":{},"sideEffects":false,"_nodeVersion":"25.9.0","dependencies":{"@audio/filter-resonator":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/speech-formant_1.0.0_1783539841345_0.7360329053063284","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@audio/speech-formant","version":"1.0.1","description":"Parallel formant filter bank","type":"module","sideEffects":false,"main":"formant.js","exports":{".":"./formant.js","./package.json":"./package.json"},"dependencies":{"@audio/filter-resonator":"^1.0.0"},"keywords":["audio","dsp","speech","formant"],"license":"MIT","author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"repository":{"type":"git","url":"git+https://github.com/audiojs/filter.git","directory":"packages/speech-formant"},"homepage":"https://github.com/audiojs/filter/tree/main/packages/speech-formant","bugs":{"url":"https://github.com/audiojs/filter/issues"},"engines":{"node":">=18"},"publishConfig":{"access":"public"},"types":"formant.d.ts","funding":"https://github.com/sponsors/audiojs","gitHead":"5182c8649144d83c9fda67a36db76f3b195588a3","_id":"@audio/speech-formant@1.0.1","_nodeVersion":"25.9.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-i3CDR5LHkPRzJieGp1mgEjeVKO+Vi9DNuovxym01J2TQqMMxoD/nCctnaTZdlIMvDhx5EY+ZXsIk85JyxUcIpA==","shasum":"e4e0e62d14cbece9c993de1898b520c0ef496d56","tarball":"https://registry.npmjs.org/@audio/speech-formant/-/speech-formant-1.0.1.tgz","fileCount":4,"unpackedSize":4812,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDNjg/wCJDx2U+Lnwgek5hYWw9oO8yah2rG5ubpjs9WPwIgCObtzz1QK+OQwWHeyqAniqU7hQP5uVQfInKwTAscwI0="}]},"_npmUser":{"name":"dy","email":"df.creative@gmail.com"},"directories":{},"maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/speech-formant_1.0.1_1783731598909_0.7532374431114071"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-08T19:44:01.173Z","modified":"2026-07-11T00:59:59.203Z","1.0.0":"2026-07-08T19:44:01.479Z","1.0.1":"2026-07-11T00:59:59.035Z"},"bugs":{"url":"https://github.com/audiojs/filter/issues"},"author":{"name":"Dmitry Iv.","email":"dfcreative@gmail.com"},"license":"MIT","homepage":"https://github.com/audiojs/filter/tree/main/packages/speech-formant","keywords":["audio","dsp","speech","formant"],"repository":{"type":"git","url":"git+https://github.com/audiojs/filter.git","directory":"packages/speech-formant"},"description":"Parallel formant filter bank","maintainers":[{"name":"jamen","email":"jamenmarz@gmail.com"},{"name":"dfcreative","email":"df.creative@gmail.com"},{"name":"dy","email":"df.creative@gmail.com"}],"readme":"# @audio/speech-formant [![npm](https://img.shields.io/npm/v/@audio/speech-formant)](https://www.npmjs.com/package/@audio/speech-formant) [![MIT](https://img.shields.io/badge/MIT-%E0%A5%90-white)](https://github.com/krishnized/license)\n\nParallel formant filter bank\n\n```\nnpm install @audio/speech-formant\n```\n\n```js\nimport formant from '@audio/speech-formant'\n```\n\nParallel resonator bank — each peak models one vocal tract resonance (formant).\n\n**Model**: parallel combination of second-order resonators, each modeling one vocal tract mode<br>\n**Formant frequencies**: determined by vocal tract shape; F1 controls vowel openness, F2 controls front/back<br>\n**Typical ranges**: F1: 250–850 Hz, F2: 850–2500 Hz, F3: 1700–3500 Hz<br>\n**Implementation**: uses [`@audio/filter-resonator`](https://github.com/audiojs/filter/tree/main/packages/filter-resonator) internally — constant peak-gain bandpass per formant<br>\n**Defaults**: F1=730 Hz (bw 90, gain 1), F2=1090 Hz (bw 110, gain 0.5), F3=2440 Hz (bw 170, gain 0.3) — open vowel /a/\n\n```js\nformant(excitation, { fs: 44100 })   // vowel /a/ (default)\n\nformant(excitation, {\n  formants: [{ fc: 270, bw: 60, gain: 1 }, { fc: 2290, bw: 90, gain: 0.5 }],\n  fs: 44100\n})   // vowel /i/\n```\n\n| Param | Default | |\n|---|---|---|\n| `formants` | 3-formant /a/ bank | array of `{ fc, bw?, gain? }` — `bw` default `50`, `gain` default `1` per band |\n| `fs` | `44100` | sample rate, Hz |\n\nRebuilds the resonator bank only when a band's `fc`/`bw`/`gain` or `fs` actually changes (keyed by content, not object identity) — safe to reuse or mutate the same `formants` array across calls.\n\n**Use when:** speech synthesis, singing synthesis, vocal effects, acoustic phonetics.\n\n**Not a substitute for:** LPC synthesis, which estimates formants automatically from a speech signal.\n\n---\n\nPart of [@audio/filter](https://github.com/audiojs/filter) — the filter family umbrella. This README is generated from the umbrella docs.\n\nMIT © [audiojs](https://github.com/audiojs)\n","readmeFilename":"README.md"}