{"_id":"@ai-coustics/aic-sdk-wasm","_rev":"9-225031da7878025f2e7973e01759c084","name":"@ai-coustics/aic-sdk-wasm","dist-tags":{"latest":"0.25.0"},"versions":{"0.14.1":{"name":"@ai-coustics/aic-sdk-wasm","version":"0.14.1","_id":"@ai-coustics/aic-sdk-wasm@0.14.1","maintainers":[{"name":"corvj-npm","email":"corvin.jaedicke@ai-coustics.com"},{"name":"steckes","email":"stephan.eckes@ai-coustics.com"}],"dist":{"shasum":"f9a2bd837c58f9fccc4bb8c572ff51683f02fa67","tarball":"https://registry.npmjs.org/@ai-coustics/aic-sdk-wasm/-/aic-sdk-wasm-0.14.1.tgz","fileCount":5,"integrity":"sha512-nU6Mk1ZBIeRRtt+Xun8ffnsQVyYOiEjEPciHOl4uv3hPwtqJ9Iai1MfGJ29rtnuz/6q4c+fA6R6mEVXU0lg6Aw==","signatures":[{"sig":"MEUCIESN6gOvd25q+J/O+/xG+b1dGBukuv3YPonBVuvumaIiAiEAhO3zKP8dSwLsWPruvf2RaAKeYtP+oQdny14KbZJ9d44=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1171111},"main":"aic_sdk_wasm.js","type":"module","types":"aic_sdk_wasm.d.ts","gitHead":"b8b50049ab6a4efae1e52921ae0f219b08f75e9c","_npmUser":{"name":"corvj-npm","email":"corvin.jaedicke@ai-coustics.com"},"_npmVersion":"10.8.2","description":"WebAssembly wrapper for the ai-coustics Speech Enhancement SDK. This package allows you to run ai-coustics models directly in the browser.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"20.20.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aic-sdk-wasm_0.14.1_1770223282052_0.7548397221631706","host":"s3://npm-registry-packages-npm-production"}},"0.17.4":{"name":"@ai-coustics/aic-sdk-wasm","version":"0.17.4","_id":"@ai-coustics/aic-sdk-wasm@0.17.4","maintainers":[{"name":"corvj-npm","email":"corvin.jaedicke@ai-coustics.com"},{"name":"steckes","email":"stephan.eckes@ai-coustics.com"}],"homepage":"https://github.com/ai-coustics/aic-sdk-wasm#readme","bugs":{"url":"https://github.com/ai-coustics/aic-sdk-wasm/issues"},"dist":{"shasum":"f135dd8ff9e88a3755326fbeeb7eb9147827992d","tarball":"https://registry.npmjs.org/@ai-coustics/aic-sdk-wasm/-/aic-sdk-wasm-0.17.4.tgz","fileCount":5,"integrity":"sha512-VAIqxwaF/juk+//2vzUhQvdlFkQSGHftj/vFgbRrlRR54oO+bQiFiXV0eHJn9p3KwEkHV3zLfa8+uARYohIlew==","signatures":[{"sig":"MEQCIAR20zF3IeJEFoD3prM0Ron0W5sFWWMRT2RkTtHkOK0fAiAZkEYNhv8+jGCvThhPm7btk7+S4T36gJcob1+8L2SRLA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1442891},"main":"aic_sdk_wasm.js","type":"module","types":"aic_sdk_wasm.d.ts","gitHead":"67ce99935cbfdcc6413e4f465b64d11af65cf872","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bbdbda04-2a10-4069-a75b-3717b0eaa72f"}},"repository":{"url":"git+https://github.com/ai-coustics/aic-sdk-wasm.git","type":"git"},"_npmVersion":"11.11.0","description":"WebAssembly wrapper for the ai-coustics Speech Enhancement SDK. This package allows you to run ai-coustics models directly in the browser.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aic-sdk-wasm_0.17.4_1777393149727_0.015469226729380336","host":"s3://npm-registry-packages-npm-production"}},"0.17.5":{"name":"@ai-coustics/aic-sdk-wasm","version":"0.17.5","_id":"@ai-coustics/aic-sdk-wasm@0.17.5","maintainers":[{"name":"corvj-npm","email":"corvin.jaedicke@ai-coustics.com"},{"name":"steckes","email":"stephan.eckes@ai-coustics.com"}],"homepage":"https://github.com/ai-coustics/aic-sdk-wasm#readme","bugs":{"url":"https://github.com/ai-coustics/aic-sdk-wasm/issues"},"dist":{"shasum":"8db556e4034d0001c40b65fbb7277ba3329bf4eb","tarball":"https://registry.npmjs.org/@ai-coustics/aic-sdk-wasm/-/aic-sdk-wasm-0.17.5.tgz","fileCount":5,"integrity":"sha512-kbUa8pCqYMG1Izkz8iUAlpbvK9K2S1IfXJmWWPbT1X1aCTh+H/SuoLSpx09HEuyshpPu1lve1SUfqgUP0I+zxQ==","signatures":[{"sig":"MEYCIQCFf7xGnmB/ZVnwzgq85YuSdENERpdaYjTYIFvI9aW/TwIhANVSm5yyrQ2AD8k0H3vXVSvDwG/LzMKXX1ZxSMut8d5T","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1443123},"main":"aic_sdk_wasm.js","type":"module","types":"aic_sdk_wasm.d.ts","gitHead":"d3ebd295c4457f7f4c514231df85cb424bd243db","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bbdbda04-2a10-4069-a75b-3717b0eaa72f"}},"repository":{"url":"git+https://github.com/ai-coustics/aic-sdk-wasm.git","type":"git"},"_npmVersion":"11.11.0","description":"WebAssembly wrapper for the ai-coustics Speech Enhancement SDK. This package allows you to run ai-coustics models directly in the browser.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"24.14.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aic-sdk-wasm_0.17.5_1778169903312_0.63325832677952","host":"s3://npm-registry-packages-npm-production"}},"0.19.0":{"name":"@ai-coustics/aic-sdk-wasm","version":"0.19.0","_id":"@ai-coustics/aic-sdk-wasm@0.19.0","maintainers":[{"name":"corvj-npm","email":"corvin.jaedicke@ai-coustics.com"},{"name":"steckes","email":"stephan.eckes@ai-coustics.com"}],"homepage":"https://github.com/ai-coustics/aic-sdk-wasm#readme","bugs":{"url":"https://github.com/ai-coustics/aic-sdk-wasm/issues"},"dist":{"shasum":"89c16d80b3ec7ec66651ea3482fdf70168274033","tarball":"https://registry.npmjs.org/@ai-coustics/aic-sdk-wasm/-/aic-sdk-wasm-0.19.0.tgz","fileCount":5,"integrity":"sha512-fuy/d3JddsLOcUlYxC1YXzld7W8nLwtvuLT9o/L2AyUPKuLmIWbVAnsOez75DuBRqPNumayNgAYNY4q/4wHp9A==","signatures":[{"sig":"MEUCIGRSpTQmyRs+g9rfXnDTCjXaZkxxX1gccjfnJ67lkQo6AiEAgNvCK6ljTGX4B7hHm+/sVSimrhRxmiMcoWPGJnla7lg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1415366},"main":"aic_sdk_wasm.js","type":"module","types":"aic_sdk_wasm.d.ts","gitHead":"e1d5a18b5cd0fbd31ec0f0d0836f8a130e2f3b28","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bbdbda04-2a10-4069-a75b-3717b0eaa72f"}},"repository":{"url":"git+https://github.com/ai-coustics/aic-sdk-wasm.git","type":"git"},"_npmVersion":"11.13.0","description":"WebAssembly wrapper for the ai-coustics Speech Enhancement SDK. This package allows you to run ai-coustics models directly in the browser.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"24.16.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aic-sdk-wasm_0.19.0_1780068820040_0.9568378388473271","host":"s3://npm-registry-packages-npm-production"}},"0.20.0":{"name":"@ai-coustics/aic-sdk-wasm","version":"0.20.0","_id":"@ai-coustics/aic-sdk-wasm@0.20.0","maintainers":[{"name":"corvj-npm","email":"corvin.jaedicke@ai-coustics.com"},{"name":"steckes","email":"stephan.eckes@ai-coustics.com"}],"homepage":"https://github.com/ai-coustics/aic-sdk-wasm#readme","bugs":{"url":"https://github.com/ai-coustics/aic-sdk-wasm/issues"},"dist":{"shasum":"7ae72b18ea24c2040cd0a30f1ef5c2615435dc4e","tarball":"https://registry.npmjs.org/@ai-coustics/aic-sdk-wasm/-/aic-sdk-wasm-0.20.0.tgz","fileCount":5,"integrity":"sha512-acvro2n9kS6HcMhiPQP2husW2JA8n48vOmLWALSxcUD7SiI2MfyVmuEOSUtfKqdwlgnWe27WykUjJB8MEcLBSg==","signatures":[{"sig":"MEUCIQCXohRvVp7xGmqLX9Jk0o0Zu26ZSB0A6Hersl7a3gAc6gIgWB0GF0+u1Wmm/cyNWohBm32iZiKM8Uywf1+8lr7ARBE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1322379},"main":"aic_sdk_wasm.js","type":"module","types":"aic_sdk_wasm.d.ts","gitHead":"30c9c477a209deec628491f521ff42361ac4a4ae","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bbdbda04-2a10-4069-a75b-3717b0eaa72f"}},"repository":{"url":"git+https://github.com/ai-coustics/aic-sdk-wasm.git","type":"git"},"_npmVersion":"11.13.0","description":"WebAssembly wrapper for the ai-coustics Speech Enhancement SDK. This package allows you to run ai-coustics models directly in the browser.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"24.16.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aic-sdk-wasm_0.20.0_1781188201109_0.7846428490051425","host":"s3://npm-registry-packages-npm-production"}},"0.21.0":{"name":"@ai-coustics/aic-sdk-wasm","version":"0.21.0","_id":"@ai-coustics/aic-sdk-wasm@0.21.0","maintainers":[{"name":"corvj-npm","email":"corvin.jaedicke@ai-coustics.com"},{"name":"steckes","email":"stephan.eckes@ai-coustics.com"}],"homepage":"https://github.com/ai-coustics/aic-sdk-wasm#readme","bugs":{"url":"https://github.com/ai-coustics/aic-sdk-wasm/issues"},"dist":{"shasum":"de1b31b51928926a190fedcc5e788a773d80c845","tarball":"https://registry.npmjs.org/@ai-coustics/aic-sdk-wasm/-/aic-sdk-wasm-0.21.0.tgz","fileCount":5,"integrity":"sha512-6OupcZXdMvWfd8+hIlA0jB2k1B2j2UAPkgW/zsxMU1wdLIm/IlQ5DMLBJPzhDne+Vvn1C+tXXNqdyyuJHEZShA==","signatures":[{"sig":"MEYCIQCJEz2ws0+iJFg12/9rs5C3NP9U618tTBnjg97hVq+zzAIhAKzaG7JT1UGwsajiHLWfRRgLZUxLDk7vrHUTKssH9I64","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1329823},"main":"aic_sdk_wasm.js","type":"module","types":"aic_sdk_wasm.d.ts","gitHead":"285b994d98ef7d4bcdd13c90a63546555e3330dd","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bbdbda04-2a10-4069-a75b-3717b0eaa72f"}},"repository":{"url":"git+https://github.com/ai-coustics/aic-sdk-wasm.git","type":"git"},"_npmVersion":"11.13.0","description":"WebAssembly wrapper for the ai-coustics Speech Enhancement SDK. This package allows you to run ai-coustics models directly in the browser.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"24.16.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aic-sdk-wasm_0.21.0_1782293709703_0.3184476699815637","host":"s3://npm-registry-packages-npm-production"}},"0.22.0":{"name":"@ai-coustics/aic-sdk-wasm","version":"0.22.0","_id":"@ai-coustics/aic-sdk-wasm@0.22.0","maintainers":[{"name":"corvj-npm","email":"corvin.jaedicke@ai-coustics.com"},{"name":"steckes","email":"stephan.eckes@ai-coustics.com"}],"homepage":"https://github.com/ai-coustics/aic-sdk-wasm#readme","bugs":{"url":"https://github.com/ai-coustics/aic-sdk-wasm/issues"},"dist":{"shasum":"33a9ccb425d1328fd3d4c2ccbfbe8fda9a2e0430","tarball":"https://registry.npmjs.org/@ai-coustics/aic-sdk-wasm/-/aic-sdk-wasm-0.22.0.tgz","fileCount":5,"integrity":"sha512-u2whesT59tr3yjANR07xIRpaIvxG0351MBauT/SQNbsrXvwtWSwj6qI9umFeb1WT8aPBUDd1iUl760vVuDNtlQ==","signatures":[{"sig":"MEUCIAqRhyiEHePOgazlnrshMjgdAroiN1ccNQE7UFHBO8UGAiEAnV/sYMCvFYQuM0TGxZGP3DeM7XkpIbiot3UvPCMYNwE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1450530},"main":"aic_sdk_wasm.js","type":"module","types":"aic_sdk_wasm.d.ts","gitHead":"ee2759f864207d807ab0572efad0783be8c78d32","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bbdbda04-2a10-4069-a75b-3717b0eaa72f"}},"repository":{"url":"git+https://github.com/ai-coustics/aic-sdk-wasm.git","type":"git"},"_npmVersion":"11.17.0","description":"WebAssembly wrapper for the ai-coustics Speech Enhancement SDK. This package allows you to run ai-coustics models directly in the browser.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"24.19.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aic-sdk-wasm_0.22.0_1786112914401_0.9592771677067051","host":"s3://npm-registry-packages-npm-production"}},"0.23.0":{"name":"@ai-coustics/aic-sdk-wasm","version":"0.23.0","_id":"@ai-coustics/aic-sdk-wasm@0.23.0","maintainers":[{"name":"corvj-npm","email":"corvin.jaedicke@ai-coustics.com"},{"name":"steckes","email":"stephan.eckes@ai-coustics.com"}],"homepage":"https://github.com/ai-coustics/aic-sdk-wasm#readme","bugs":{"url":"https://github.com/ai-coustics/aic-sdk-wasm/issues"},"dist":{"shasum":"fa769e6ca381fd09ec1e02df81a2ef7d37deb485","tarball":"https://registry.npmjs.org/@ai-coustics/aic-sdk-wasm/-/aic-sdk-wasm-0.23.0.tgz","fileCount":5,"integrity":"sha512-MAMh81XpSJm0gv4kcLKmIHyHpCImR+Cyn8T5NMSX0K8YJWh2Hk4l5zvhy1ys8pUbzpK9hfK6ZgqL67IIJDa8pQ==","signatures":[{"sig":"MEQCIG9fYVp1bHyl7QWEuuFNilBnMVQocO7MkHcbF1GhcsvyAiAJHgPf3TmgvsYg1AKIRJ33qV6Bm2AqG+2RGloEY34qvg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1451597},"main":"aic_sdk_wasm.js","type":"module","types":"aic_sdk_wasm.d.ts","gitHead":"1d4f06bd140487cac47450c60f2f57939755515c","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:bbdbda04-2a10-4069-a75b-3717b0eaa72f"}},"repository":{"url":"git+https://github.com/ai-coustics/aic-sdk-wasm.git","type":"git"},"_npmVersion":"11.16.0","description":"WebAssembly wrapper for the ai-coustics Speech Enhancement SDK. This package allows you to run ai-coustics models directly in the browser.","directories":{},"sideEffects":["./snippets/*"],"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/aic-sdk-wasm_0.23.0_1786366202887_0.2631212939585299","host":"s3://npm-registry-packages-npm-production"}},"0.25.0":{"_id":"@ai-coustics/aic-sdk-wasm@0.25.0","bugs":{"url":"https://github.com/ai-coustics/aic-sdk-wasm/issues"},"dist":{"shasum":"1cfe1f5be56ca77b7013753748806709ff93eaf2","tarball":"https://registry.npmjs.org/@ai-coustics/aic-sdk-wasm/-/aic-sdk-wasm-0.25.0.tgz","fileCount":6,"integrity":"sha512-bOZIpTp5RzKK6t9vk7lJ5TBxMhaY7U/CviDMg9R13XDOYZjW5fK4jp7sx0zr8g+noorB0w+N7Me96e/x8vSTww==","signatures":[{"sig":"MEUCID/1lMDMophJmxF6zFpwjzahNpB4ArPzkW3Ho8ueZKK5AiEA95Vt6tz7nCy+Ci/KmOZG7TrlRyJJ9TVnvp8T3k/mrlM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCuSNfxJK+EmqQL12XBvdtUM3FGTbAxoul2EGjKE2X8NgIgMDOfTBBixgP/8YfkuZhYVM/o25u8XqxLtP8WGa2QldE="}],"unpackedSize":1506001},"main":"aic_sdk_wasm.js","name":"@ai-coustics/aic-sdk-wasm","type":"module","types":"aic_sdk_wasm.d.ts","gitHead":"35b18c9e2dfa922981e9cbc4b8cdca5ceb1560ee","version":"0.25.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"bbdbda04-2a10-4069-a75b-3717b0eaa72f"}},"homepage":"https://github.com/ai-coustics/aic-sdk-wasm#readme","repository":{"url":"git+https://github.com/ai-coustics/aic-sdk-wasm.git","type":"git"},"_npmVersion":"11.19.0","description":"WebAssembly wrapper for the ai-coustics Speech Enhancement SDK. This package allows you to run ai-coustics models directly in the browser.","directories":{},"maintainers":[{"name":"corvj-npm","email":"corvin.jaedicke@ai-coustics.com"},{"name":"steckes","email":"stephan.eckes@ai-coustics.com"}],"sideEffects":["./snippets/*"],"_nodeVersion":"24.21.0","_hasShrinkwrap":false,"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/aic-sdk-wasm_0.25.0_1790685781023_0.09724855093210594"}}},"time":{"created":"2026-02-04T16:41:21.955Z","modified":"2026-09-29T12:43:01.392Z","0.14.1":"2026-02-04T16:41:22.284Z","0.17.4":"2026-04-28T16:19:10.026Z","0.17.5":"2026-05-07T16:05:03.492Z","0.19.0":"2026-05-29T15:33:40.328Z","0.20.0":"2026-06-11T14:30:01.255Z","0.21.0":"2026-06-24T09:35:09.900Z","0.22.0":"2026-08-07T14:28:34.579Z","0.23.0":"2026-08-10T12:50:03.093Z","0.25.0":"2026-09-29T12:43:01.134Z"},"bugs":{"url":"https://github.com/ai-coustics/aic-sdk-wasm/issues"},"homepage":"https://github.com/ai-coustics/aic-sdk-wasm#readme","repository":{"url":"git+https://github.com/ai-coustics/aic-sdk-wasm.git","type":"git"},"description":"WebAssembly wrapper for the ai-coustics Speech Enhancement SDK. This package allows you to run ai-coustics models directly in the browser.","maintainers":[{"name":"corvj-npm","email":"corvin.jaedicke@ai-coustics.com"},{"name":"steckes","email":"stephan.eckes@ai-coustics.com"}],"readme":"# aic-sdk-wasm - WebAssembly Bindings for ai-coustics SDK\n\nWebAssembly wrapper for the ai-coustics Speech Enhancement SDK. This package allows you to run ai-coustics models directly in the browser.\n\nFor comprehensive documentation, visit [docs.ai-coustics.com](https://docs.ai-coustics.com).\n\n> [!NOTE]\n> This SDK requires a license key. Generate your key at [developers.ai-coustics.io](https://developers.ai-coustics.io).\n\n## Installation\n\n```bash\nnpm install @ai-coustics/aic-sdk-wasm\n```\n\nThe package is built with WebAssembly SIMD (`simd128`) and needs a runtime that supports it.\n\n## Quick Start\n\n```javascript\nimport init, { Model, Processor } from \"@ai-coustics/aic-sdk-wasm\";\n\n// Initialize the WASM module\nawait init();\n\n// Load a model\nconst response = await fetch(\"https://artifacts.ai-coustics.io/models/quail-vf-2-2-s-16khz/v7/quail_vf_2_2_s_16khz_gf70x7zf_v14.aicmodel\");\nconst modelBytes = new Uint8Array(await response.arrayBuffer());\nconst model = Model.fromBytes(modelBytes);\n\n// Get optimal configuration\nconst sampleRate = model.getOptimalSampleRate();\nconst blockSize = model.getOptimalBlockSize(sampleRate);\n\n// Create and initialize processor\nconst processor = new Processor(model, \"YOUR_LICENSE_KEY\");\nprocessor.initialize(sampleRate, blockSize, false);\n\nconst audioBuffer = new Float32Array(blockSize);\n// Process a mono audio block in place\nprocessor.process(audioBuffer);\n```\n\n## Usage\n\n### SDK Information\n\n```javascript\nimport { getVersion, getCompatibleModelVersion } from \"@ai-coustics/aic-sdk-wasm\";\n\n// Get SDK version\nconsole.log(`SDK version: ${getVersion()}`);\n\n// Get compatible model version\nconsole.log(`Compatible model version: ${getCompatibleModelVersion()}`);\n```\n\n### Loading Models\n\nDownload models and find available IDs at [artifacts.ai-coustics.io](https://artifacts.ai-coustics.io/).\n\nSince browsers cannot access the file system directly, you must load the model file as a byte array (Uint8Array).\n\n```javascript\n// Fetch the .aicmodel file\nconst response = await fetch(\"https://artifacts.ai-coustics.io/models/quail-vf-2-2-s-16khz/v7/quail_vf_2_2_s_16khz_gf70x7zf_v14.aicmodel\");\nconst bytes = new Uint8Array(await response.arrayBuffer());\n\n// Create Model instance\nconst model = Model.fromBytes(bytes);\n```\n\n### Model Information\n\n```javascript\n// Get model ID\nconst modelId = model.getId();\n\n// Get optimal sample rate for the model\nconst optimalRate = model.getOptimalSampleRate();\n\n// Get the optimal block size for a specific sample rate\nconst optimalBlockSize = model.getOptimalBlockSize(48000);\n```\n\n### Configuring the Processor\n\nThe `Processor` accepts enhancement and bypass models only. Dedicated VAD models go\nthrough the [`Vad`](#voice-activity-detection-vad) class and analysis models through\n[`Analyzer`](#analysis); passing the wrong type throws `ModelTypeUnsupported`.\n\n```javascript\n// Create processor\nconst processor = new Processor(model, \"YOUR_LICENSE_KEY\");\n\n// Initialize with audio settings\nprocessor.initialize(\n  sampleRate,           // Sample rate in Hz (8000 - 192000)\n  blockSize,            // Samples per processing call\n  variableBlockSize     // Allow shorter blocks than blockSize (default: false)\n);\n```\n\n### Processing Audio\n\nThe processor is mono. To process multichannel audio, mix it down to mono, or\ncreate one processor per channel.\n\n```javascript\nconst buffer = new Float32Array(blockSize);\n// Process a mono audio block in place\nprocessor.process(buffer);\n```\n\n### Processor Context\n\n```javascript\nimport { ProcessorParameter } from \"@ai-coustics/aic-sdk-wasm\";\n\n// Get processor context\nconst procCtx = processor.getContext();\n\n// Get the delay applied to the audio, in samples\nconst delay = procCtx.getAudioDelay();\n\n// Reset processor state (clears internal buffers)\nprocCtx.reset();\n\n// Set enhancement parameters\nprocCtx.setParameter(ProcessorParameter.EnhancementLevel, 0.8);\nprocCtx.setParameter(ProcessorParameter.Bypass, 0.0);\n\n// Get parameter values\nconst level = procCtx.getParameter(ProcessorParameter.EnhancementLevel);\nconsole.log(`Enhancement level: ${level}`);\n```\n\n### Voice Activity Detection (VAD)\n\nVoice activity detection is a first-class object. It runs a dedicated VAD model through\nthe `Vad` class and is driven explicitly, independently of any processor. `new Vad(...)`\nthrows `ModelTypeUnsupported` for anything that is not a VAD model.\n\n```javascript\nimport { Vad, VadParameter } from \"@ai-coustics/aic-sdk-wasm\";\n\n// Load a dedicated VAD model and create a Vad from it\nconst vadResponse = await fetch(\"https://artifacts.ai-coustics.io/models/vad-2-1-xxs-16khz/v7/vad_2_1_xxs_16khz_mw7jdprk_v36.aicmodel\");\nconst vadModel = Model.fromBytes(new Uint8Array(await vadResponse.arrayBuffer()));\n\nconst vad = new Vad(vadModel, \"YOUR_LICENSE_KEY\");\nconst vadSampleRate = vadModel.getOptimalSampleRate();\nconst vadBlockSize = vadModel.getOptimalBlockSize(vadSampleRate);\nvad.initialize(vadSampleRate, vadBlockSize, false);\n\nconst vadCtx = vad.getContext();\n\n// Configure VAD parameters\nvadCtx.setParameter(VadParameter.Sensitivity, 0.8); // probability threshold, 0.0 - 1.0\nvadCtx.setParameter(VadParameter.SpeechHoldDuration, 0.03);\nvadCtx.setParameter(VadParameter.MinimumSpeechDuration, 0.0);\n\n// Get parameter values\nconst sensitivity = vadCtx.getParameter(VadParameter.Sensitivity);\nconsole.log(`VAD sensitivity: ${sensitivity}`);\n\n// The VAD is driven explicitly and does not modify the audio\nvad.process(block);\n\nif (vadCtx.isSpeechDetected()) {\n  console.log(\"Speech detected!\");\n}\n\n// Raw model prediction, without speech hold / thresholding post-processing\nconsole.log(vadCtx.getRawVadProbability());\n```\n\n#### Run the VAD on the original audio\n\nIf you use enhancement and VAD together, **feed the VAD the original input audio, not the\nprocessor's enhanced output.** Run the two objects side by side on the same mono block\nrather than chaining them:\n\n```javascript\nvad.process(block);       // reads the block, does not modify it\nprocessor.process(block); // enhances the block in place\n```\n\nEnhancement is designed to change the signal, so running the VAD on its output means\ndetecting speech in audio that no longer matches what the VAD model expects. It also stacks\nthe processor's delay on top of the VAD's own prediction delay, which makes speech decisions\nharder to align.\n\n#### Delays\n\nThe processor delays audio, the VAD does not, so the two queries report different things and\nare independent of each other:\n\n```javascript\nconst audioDelay = procCtx.getAudioDelay();          // enhanced audio lags the input by this much\nconst predictionDelay = vadCtx.getPredictionDelay(); // the VAD prediction lags the same input by this much\n```\n\n`getPredictionDelay()` is *not* applied to the audio — `vad.process` leaves the buffer\nuntouched. Use it to line speech decisions up with the audio timeline.\n\n```javascript\n// Clear VAD state on a stream discontinuity\nvadCtx.reset();\n\n// Refresh a JWT-form license without reconstructing the VAD\n// vadCtx.updateBearerToken(newJwt);\n```\n\n### Energy-based Voice Activity Detection\n\nAn enhancement processor can report speech activity without running a separate VAD model.\nCreate a context before processing and read its prediction after each audio block:\n\n```javascript\nconst energyVadCtx = processor.getEnergyVadContext();\nenergyVadCtx.setParameter(VadParameter.Sensitivity, 6.0);\n\nprocessor.process(block);\nconst speechDetected = energyVadCtx.isSpeechDetected();\n```\n\n`EnergyVadContext` also provides `getParameter`, `getPredictionDelay`, and `reset`.\nIt can outlive the processor. Resetting it keeps its settings and does not reset enhancement;\nresetting the processor also resets its energy VAD.\nSensitivity ranges from 1 to 15, with higher values detecting quieter signals.\nCreating a context keeps inference active even while bypassed or fully dry.\n\n### Analysis\n\nFor analysis-only models (e.g. Tyto) use the `Analyzer` class instead of `Processor`. The analyzer buffers audio in the audio thread via `buffer` and runs the analysis model on demand via `analyze()`.\n\n```javascript\nimport { Analyzer } from \"@ai-coustics/aic-sdk-wasm\";\n\n// Load an analysis model and create an Analyzer from it\nconst analysisResponse = await fetch(\"https://artifacts.ai-coustics.io/models/tyto-1-1-l-16khz/v7/tyto_1_1_l_16khz_t7y7v3h5_v58.aicmodel\");\nconst analysisModel = Model.fromBytes(new Uint8Array(await analysisResponse.arrayBuffer()));\n\nconst sampleRate = analysisModel.getOptimalSampleRate();\nconst blockSize = analysisModel.getOptimalBlockSize(sampleRate);\n\nconst analyzer = new Analyzer(analysisModel, \"YOUR_LICENSE_KEY\");\nanalyzer.initialize(sampleRate, blockSize, false);\n\n// From the audio path:\nanalyzer.buffer(audioChunk);\n\n// From any context:\nconst result = analyzer.analyze();\nconsole.log(result.riskScore, result.speakerReverb, result.speakerLoudness,\n            result.interferingSpeech, result.noise, result.codecDegradation,\n            result.packetLoss);\nresult.free();\n\n// Optional: clear buffered audio on stream discontinuity.\nanalyzer.reset();\n\n// Optional: refresh a JWT-form license without reconstructing the analyzer.\n// analyzer.updateBearerToken(newJwt);\n\nanalyzer.free();\nanalysisModel.free();\n```\n\nEach class accepts exactly one family of models, and throws `ModelTypeUnsupported` for the rest:\n\n| Class | Accepted models |\n| --- | --- |\n| `Processor` | enhancement, bypass |\n| `Vad` | dedicated VAD |\n| `Analyzer` | analysis |\n\n## Memory Management\n\nWebAssembly memory should be manually freed when objects are no longer needed. This does not need to be done if the browser supports [weak references](https://wasm-bindgen.github.io/wasm-bindgen/reference/weak-references.html).\n\n\n```javascript\n// When finished with the VAD\nvadCtx.free();\nvad.free();\n\n// When finished with the processor\nprocessor.free();\n\n// When finished with the model (and you won't create new objects from it)\nmodel.free();\n```\n\n### Ending the telemetry session early\n\nA telemetry session is stopped automatically when the owning object is freed. Because\nJavaScript object deallocation is up to the garbage collector and can be delayed\narbitrarily, `Processor`, `Vad` and `Analyzer` also expose an explicit\n`terminateSession()` for lifecycle events. After it has been handled, the object is no\nlonger allowed to process audio.\n\n```javascript\nprocessor.terminateSession();\nvad.terminateSession();\nanalyzer.terminateSession();\n```\n\n## Examples\n\nSee the [`examples/`](examples/) directory for complete working examples, including:\n- **index.html**: Full interactive demo with file inputs for an enhancement model, a VAD model and an analysis model, parameter controls, and real-time VAD visualization.\n- **benchmark.html**: Performance benchmark tool to measure processing latency.\n- **basic.html**: Demonstrates all core SDK APIs.\n\n## Documentation\n\n- **Full Documentation**: [docs.ai-coustics.com](https://docs.ai-coustics.com)\n- **Available Models**: [artifacts.ai-coustics.io](https://artifacts.ai-coustics.io)\n","readmeFilename":"README.md"}