{"_id":"@ai-coustics/livekit-plugin","_rev":"2-82104d31b1f0033e5d27d14356b93ee3","name":"@ai-coustics/livekit-plugin","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@ai-coustics/livekit-plugin","version":"0.1.0","author":{"name":"ai-coustics GmbH"},"license":"Apache-2.0","_id":"@ai-coustics/livekit-plugin@0.1.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/livekit-plugins#readme","bugs":{"url":"https://github.com/ai-coustics/livekit-plugins/issues"},"dist":{"shasum":"c20b11637a11c32d95c17eb2ef99f1ea3f9d4e38","tarball":"https://registry.npmjs.org/@ai-coustics/livekit-plugin/-/livekit-plugin-0.1.0.tgz","fileCount":10,"integrity":"sha512-jw2iCjxCdb66UcPYGW3zorUdTqLWsBMZp05+rMoswOrFdL4Wl3ZWnUG/OEt1YoAvt9PaQ0a/k9MBhk7U26THpQ==","signatures":[{"sig":"MEUCIC4sPBLqYlpoeQyj9umAGTStrpMcjz6AIXRV7chEr3rUAiEAmsdCCXfG+NYozPpu9iZ62EpH3txEoJu5KiS5MIVVfLc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":315433},"main":"dist/index.cjs","type":"module","_from":"file:dist/ai-coustics-livekit-plugin-0.1.0.tgz","types":"dist/index.d.ts","module":"dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"scripts":{"test":"vitest run test/analyzer.test.ts test/frame_processor_chain.test.ts test/processor.test.ts test/vad.test.ts","build":"tsup","check":"tsc --noEmit","prepack":"npm run build","test:e2e":"vitest run test/e2e-room.test.ts","test:integration":"vitest run test/integration.test.ts"},"_npmUser":{"name":"corvj-npm","email":"corvin.jaedicke@ai-coustics.com"},"_resolved":"/home/runner/work/livekit-plugins/livekit-plugins/dist/ai-coustics-livekit-plugin-0.1.0.tgz","_integrity":"sha512-jw2iCjxCdb66UcPYGW3zorUdTqLWsBMZp05+rMoswOrFdL4Wl3ZWnUG/OEt1YoAvt9PaQ0a/k9MBhk7U26THpQ==","repository":{"url":"git+https://github.com/ai-coustics/livekit-plugins.git","type":"git"},"_npmVersion":"12.0.2","description":"ai-coustics noise cancellation and VAD for LiveKit Agents","directories":{},"_nodeVersion":"22.23.2","dependencies":{"@opentelemetry/api":"^1.9.0","@ai-coustics/aic-sdk":"^0.23.0","@livekit/typed-emitter":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","vitest":"^3.2.4","typescript":"^5.9.3","@types/node":"^22.0.0","@livekit/agents":"^1.0.43","@livekit/rtc-node":"^0.13.24","livekit-server-sdk":"^2.14.1"},"peerDependencies":{"@livekit/agents":">=1.0.43 <2","@livekit/rtc-node":">=0.13.24 <1"},"_npmOperationalInternal":{"tmp":"tmp/livekit-plugin_0.1.0_1786549079879_0.5321921487875252","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"_id":"@ai-coustics/livekit-plugin@0.2.0","bugs":{"url":"https://github.com/ai-coustics/livekit-plugins/issues"},"dist":{"shasum":"1ab9fecbc53c1cb66fb26cba82749c98ea089354","tarball":"https://registry.npmjs.org/@ai-coustics/livekit-plugin/-/livekit-plugin-0.2.0.tgz","fileCount":10,"integrity":"sha512-LTSXRlRkyEDApcxmhhnP1L9B1ESvNJ9V5QAKoWfvgUpz87BsE+2PlZBtVnvXXOV33afvdRgQiGuH0GXyYUuwSw==","signatures":[{"sig":"MEYCIQD2s/uIt4FAbR9gcoXRhIpHxek6upu39yQAibXHmmgZtgIhAIVrKX45Z3C1d45/hJfmg6YztZE3wOnaFeTz09sow9yt","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCbiY+4DhrR6l+iN3/RwRxVNI85okIv4qFn7FpRCjuq1wIgUtcSVgJV5KeFJNY/HNdrbE7Yx0qVRAnq8yHeF+7ZZjs="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@ai-coustics%2flivekit-plugin@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":326913},"main":"dist/index.cjs","name":"@ai-coustics/livekit-plugin","type":"module","_from":"file:dist/ai-coustics-livekit-plugin-0.2.0.tgz","types":"dist/index.d.ts","author":{"name":"ai-coustics GmbH"},"module":"dist/index.js","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.js"},"require":{"types":"./dist/index.d.cts","default":"./dist/index.cjs"}}},"license":"Apache-2.0","scripts":{"test":"vitest run test/analyzer.test.ts test/frame_processor_chain.test.ts test/processor.test.ts test/vad.test.ts","build":"tsup","check":"tsc --noEmit","prepack":"npm run build","test:e2e":"vitest run test/e2e-room.test.ts","test:integration":"vitest run test/integration.test.ts"},"version":"0.2.0","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:5f93d92e-2efa-4a76-a27a-00e19cc104f2"}},"homepage":"https://github.com/ai-coustics/livekit-plugins#readme","_resolved":"/home/runner/work/livekit-plugins/livekit-plugins/dist/ai-coustics-livekit-plugin-0.2.0.tgz","_integrity":"sha512-LTSXRlRkyEDApcxmhhnP1L9B1ESvNJ9V5QAKoWfvgUpz87BsE+2PlZBtVnvXXOV33afvdRgQiGuH0GXyYUuwSw==","repository":{"url":"git+https://github.com/ai-coustics/livekit-plugins.git","type":"git"},"_npmVersion":"12.0.2","description":"ai-coustics noise cancellation and VAD for LiveKit Agents","directories":{},"maintainers":[{"name":"corvj-npm","email":"corvin.jaedicke@ai-coustics.com"},{"name":"steckes","email":"stephan.eckes@ai-coustics.com"}],"_nodeVersion":"22.23.2","dependencies":{"@opentelemetry/api":"^1.9.0","@ai-coustics/aic-sdk":"^0.24.0","@livekit/typed-emitter":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.0","vitest":"^3.2.4","typescript":"^5.9.3","@types/node":"^22.0.0","@livekit/agents":"^1.0.43","@livekit/rtc-node":"^0.13.24","livekit-server-sdk":"^2.14.1"},"peerDependencies":{"@livekit/agents":">=1.0.43 <2","@livekit/rtc-node":">=0.13.24 <1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/livekit-plugin_0.2.0_1789402602470_0.11028128796790693"}}},"time":{"created":"2026-08-12T15:37:59.692Z","modified":"2026-09-14T16:16:42.929Z","0.1.0":"2026-08-12T15:38:00.098Z","0.2.0":"2026-09-14T16:16:42.562Z"},"bugs":{"url":"https://github.com/ai-coustics/livekit-plugins/issues"},"author":{"name":"ai-coustics GmbH"},"license":"Apache-2.0","homepage":"https://github.com/ai-coustics/livekit-plugins#readme","repository":{"url":"git+https://github.com/ai-coustics/livekit-plugins.git","type":"git"},"description":"ai-coustics noise cancellation and VAD for LiveKit Agents","maintainers":[{"name":"corvj-npm","email":"corvin.jaedicke@ai-coustics.com"},{"name":"steckes","email":"stephan.eckes@ai-coustics.com"}],"readme":"# ai-coustics LiveKit plugin for Node.js\n\nAudio enhancement, voice activity detection, and audio-quality analysis for LiveKit Agents, backed by the public\n`@ai-coustics/aic-sdk` package.\n\n> [!IMPORTANT]\n> The official\n> [`@livekit/plugins-ai-coustics`](https://www.npmjs.com/package/@livekit/plugins-ai-coustics)\n> package is the recommended integration path for most applications. It supports LiveKit Cloud,\n> integrates more deeply with the LiveKit ecosystem and tooling, and offers stronger stability\n> guarantees. Avoiding breaking changes is an explicit goal of the official plugin.\n>\n> This ai-coustics-maintained package follows a faster release cadence and is designed for teams\n> that want early access to the latest ai-coustics models and product features. Some of those\n> capabilities may be experimental and subject to change, and use of this package is billed\n> separately through ai-coustics. Choose it when early adoption of new ai-coustics capabilities is\n> important for your application.\n\n## Installation\n\n> This package is an alternative to `@livekit/plugins-ai-coustics`, not an extension of it. If you\n> choose to migrate, uninstall the official package and do not mix objects from the two\n> implementations.\n\n```bash\nnpm uninstall @livekit/plugins-ai-coustics\nnpm install @ai-coustics/livekit-plugin\nexport AIC_SDK_LICENSE=...\n```\n\n## Migrating from the official LiveKit plugin\n\nReplace the package import and update the following APIs:\n\n| Official LiveKit plugin | This package |\n| --- | --- |\n| `audioEnhancement(...)` | `new Processor({ model })` |\n| `EnhancerModel.*` | An SDK `Model` loaded from a provisioned model file |\n| `modelParameters` or `updateModelParameters(...)` | `processor.getContext().setParameter(...)` |\n| `vad()` and `vadSettings` | `new VAD({ model, vadParameters })` |\n| `Auth.livekitCloud()` or `Auth.aiCousticsApi(...)` | `AIC_SDK_LICENSE` or `licenseKey` |\n\nBefore:\n\n```ts\nimport * as aic from \"@livekit/plugins-ai-coustics\";\n\nconst processor = aic.audioEnhancement({ model: aic.EnhancerModel.QuailL });\nconst vad = aic.vad();\n```\n\nAfter loading the SDK models as described below:\n\n```ts\nimport { FrameProcessorChain, Processor, VAD } from \"@ai-coustics/livekit-plugin\";\n\nconst processor = new Processor({ model: enhancementModel });\nconst vad = new VAD({ model: vadModel });\nconst frameProcessor = new FrameProcessorChain(vad.processor, processor);\n```\n\nThis package still uses a dedicated SDK VAD model. Like the official plugin, inference runs in the\nRoomIO frame-processor path and the VAD streams consume frame metadata. Provision a separate VAD\nmodel and install `vad.processor` as described below. LiveKit Cloud authentication is not carried\nover; obtain an ai-coustics SDK license before migrating.\n\n## Model provisioning\n\nDownload models during deployment or container setup:\n\n```ts\nimport { Model } from \"@ai-coustics/livekit-plugin\";\n\nconst enhancementPath = await Model.download(\"quail-vf-2.2-l-16khz\", \"./models\");\nconst vadPath = await Model.download(\"vad-2.1-xxs-16khz\", \"./models\");\nconst analysisPath = await Model.download(\"tyto-1.1-l-16khz\", \"./models\");\n```\n\nEnhancement and VAD models are different model types. Make the returned paths available to your\nworker, then load each model once per worker process:\n\n```ts\nconst enhancementModel = Model.fromFile(enhancementPath);\nconst vadModel = Model.fromFile(vadPath);\nconst analysisModel = Model.fromFile(analysisPath);\n```\n\n## Usage\n\nCreate a `Processor` and `VAD` for each agent session:\n\n```ts\nimport { voice } from \"@livekit/agents\";\nimport { FrameProcessorChain, Processor, VAD } from \"@ai-coustics/livekit-plugin\";\n\nconst processor = new Processor({ model: enhancementModel });\nconst vad = new VAD({ model: vadModel });\nconst frameProcessor = new FrameProcessorChain(vad.processor, processor);\n\nconst session = new voice.AgentSession({\n  vad,\n  // ... stt, llm, tts\n});\n\nawait session.start({\n  // ... agent, room\n  inputOptions: { noiseCancellation: frameProcessor },\n});\n```\n\n`vad.processor` must be installed in the `noiseCancellation` path whenever the VAD is used. Put it\nfirst in the chain so it runs on original microphone audio before enhancement. All VAD streams\nread the resulting immutable metadata, so the SDK model runs only once per audio block.\n\nFor VAD without enhancement, use `noiseCancellation: vad.processor`. For enhancement without VAD,\nuse `noiseCancellation: processor`.\n\n### Audio-quality analysis\n\nCreate an `Analyzer`, install its collector in RoomIO's audio path, and subscribe to its results:\n\n```ts\nimport { Analyzer } from \"@ai-coustics/livekit-plugin\";\n\nconst analyzer = new Analyzer({\n  model: analysisModel,\n  analysisInterval: 5, // seconds; 5 is the default\n});\n\nanalyzer.on(\"analysisResult\", (event) => {\n  console.log(event.result.riskScore);\n});\n\nawait session.start({\n  // ... agent, room\n  inputOptions: { noiseCancellation: analyzer.collector },\n});\n```\n\nThe `Analyzer` receives audio through `analyzer.collector`; constructing the analyzer without\ninstalling its collector does not feed it any room audio.\n\nResults are not logged by the plugin; log or handle them in the callback.\n\n### Combining frame processors\n\nUse `FrameProcessorChain` to run any number of processors in the same RoomIO audio path. For\nexample, this runs VAD inference and analysis on the raw input before enhancement:\n\n```ts\nimport { FrameProcessorChain } from \"@ai-coustics/livekit-plugin\";\n\nconst frameProcessor = new FrameProcessorChain(\n  vad.processor,\n  analyzer.collector,\n  processor,\n);\n\nawait session.start({\n  // ... agent, room\n  inputOptions: { noiseCancellation: frameProcessor },\n});\n```\n\n`FrameProcessorChain` runs its processors in order. Keep `vad.processor` first: it annotates the\noriginal frame while preserving its audio. We recommend placing `analyzer.collector` before\n`processor`; measuring raw input makes it easier to understand how input audio quality affects the\nrest of the pipeline.\n\nThis still uses LiveKit's `noiseCancellation` slot as a temporary integration. RoomIO owns the\nchain and closes the processor, collector, and analyzer together.\n\nAnalysis inference runs on a worker thread, so it never blocks the agent's event loop. If you own\nan `Analyzer` outside RoomIO, `analyzer.close()` returns a promise that resolves once any in-flight\nanalysis has settled and the SDK session is released; awaiting it is optional.\n\n## Configuration\n\nSet the enhancement level through the Processor context, and configure all SDK VAD parameters on\nthe VAD factory:\n\n```ts\nimport { ProcessorParameter } from \"@ai-coustics/livekit-plugin\";\n\nprocessor.getContext().setParameter(ProcessorParameter.EnhancementLevel, 0.8);\nvad.setParameters({\n  sensitivity: 0.5,\n  speechHoldDuration: 0.25,\n  minimumSpeechDuration: 0.05,\n});\n```\n\nSDK VAD parameter durations (`speechHoldDuration` and `minimumSpeechDuration`) are specified in\nseconds. The `VAD` constructor options `prefixPaddingDuration` and `maxBufferedSpeech` are specified\nin milliseconds. See the\n[Node.js SDK reference](https://docs.ai-coustics.com/reference/sdk/language-bindings/nodejs) and\n[VAD guide](https://docs.ai-coustics.com/models/voice-activity-detection/vad) for parameter ranges,\nmodel support, and further details.\n\nSet `AIC_SDK_LICENSE` or pass `licenseKey` to the constructor. Create a new Processor for each\nconcurrent room; RoomIO closes it with the input stream.\n\nModels must be provisioned explicitly. This package does not support\n`npx livekit-agents download-files`.\n","readmeFilename":"README.md"}