Skip to main content
This guide is for the LiveKit plugins maintained by ai-coustics: ai-coustics-livekit-plugin for Python and @ai-coustics/livekit-plugin for Node.js.For the official LiveKit-owned ai-coustics plugins, follow LiveKit’s noise and echo cancellation documentation.
The ai-coustics plugins connect the public ai-coustics SDK to LiveKit Agents. They provide:
  • Processor for real-time speech enhancement through LiveKit’s audio frame processor interface.
  • FrameProcessorChain for running frame processors in sequence.
  • VAD for shared voice activity inference through vad.processor and LiveKit’s streaming VAD interface.
  • Analyzer for periodic audio-quality analysis.
The ai-coustics-maintained plugins always use your ai-coustics SDK key and let you provision the model files yourself. LiveKit-owned plugins use LiveKit Cloud authentication and metering when used with LiveKit Cloud, or an ai-coustics SDK key in self-hosted environments.
These packages replace LiveKit’s livekit-plugins-ai-coustics and @livekit/plugins-ai-coustics packages.Do not install both the ai-coustics and LiveKit-owned plugins in the same project. The two Python distributions provide the same livekit.plugins.ai_coustics import path, and objects from the two implementations cannot be mixed.

Prerequisites

Before you start, you need:

Setup guide

1

Create a LiveKit agent project

If you do not already have an agent, install the LiveKit CLI, authenticate it, and create a starter project:
This project creation flow uses LiveKit Cloud. If you already have an agent project or use a self-hosted LiveKit deployment, skip lk cloud auth and configure your own LiveKit connection. The ai-coustics plugin requires a separate ai-coustics SDK key in either case.
2

Install the ai-coustics plugin

If you are migrating from a LiveKit-owned plugin, follow the migration guide. The old package must be removed first:
3

Configure your SDK key

Add your ai-coustics SDK key to the backend environment used by your agent:
.env.local
Keep this key on the server. Do not expose it in a browser or mobile client.
4

Add speech enhancement and VAD

Load model weights once per worker process. Then create a new Processor and VAD for each agent session.
vad.processor must be installed in the RoomIO audio path whenever VAD is used. The chain runs it on the original microphone audio before Processor enhances the frame. VAD streams then read the metadata attached to that frame, so the SDK VAD model runs only once per audio block.For VAD without enhancement, configure vad.processor directly as noise_cancellation or noiseCancellation. For enhancement without VAD, configure processor directly.
5

Run the agent

Your LiveKit agent now uses the ai-coustics plugin for speech enhancement and voice activity detection.

Model provisioning

Downloading and loading are separate operations. Model.download stores a model in a directory you choose and returns its resolved path. Model.from_file in Python or Model.fromFile in Node.js loads an existing model file into memory. The quickstart leaves the optional download calls commented out so you can run them during provisioning. For production, download models while building your container or preparing the deployment. Make the resulting files available to the worker and load them directly:
These plugins do not integrate with the LiveKit download-files command. Provision ai-coustics models explicitly with Model.download or supply model files yourself.

Choose models

The plugins do not embed a fixed selection of models. You can load any model compatible with the underlying ai-coustics SDK. Enhancement, VAD, and analysis models are different model types and cannot be substituted for one another. See the models reference for other model IDs and the VAD guide for parameter ranges.

Audio-quality analysis

To monitor the incoming audio with Tyto, create an Analyzer for each session and place its collector before VAD and enhancement:
Pass frame_processor_with_analysis or frameProcessorWithAnalysis to RoomIO as shown in the setup guide. The plugin does not log analysis results automatically; handle them in the event callback. Constructing an Analyzer without adding its collector to the audio path does not feed it any audio.

Authentication

AIC_SDK_LICENSE is the default authentication method. You can instead pass the key directly when constructing a component:
The custom plugins do not support Auth.livekit_cloud() or LiveKit Cloud metering. Generate an SDK key on the ai-coustics developer platform.

Lifecycle

Every call to Model.from_file in Python or Model.fromFile in Node.js loads a separate copy of the model into memory. Ideally, call it only once for each model file in a worker process. You can then reuse the resulting Model object to create any number of Processor, VAD, or Analyzer instances of the corresponding model type. The Model objects can be shared across sessions, but each concurrent room needs its own instance of every stateful component it uses: Processor, VAD, and Analyzer. LiveKit RoomIO closes a directly configured frame processor or FrameProcessorChain when its input stream closes; a chain closes the components it contains.

Next steps

Plugins on GitHub

Browse the Python and Node.js plugins and their examples.

Speech enhancement models

Choose between Quail and Quail Voice Focus models.

ai-coustics VAD

Configure noise-robust voice activity detection.

Tyto: Audio Insight

Understand and act on audio-quality analysis results.

Migration guide

Migrate from LiveKit-owned packages to the plugins maintained by ai-coustics.