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.Processorfor real-time speech enhancement through LiveKit’s audio frame processor interface.FrameProcessorChainfor running frame processors in sequence.VADfor shared voice activity inference throughvad.processorand LiveKit’s streaming VAD interface.Analyzerfor periodic audio-quality analysis.
Prerequisites
Before you start, you need:- A LiveKit agent project. You can create one from a LiveKit starter template.
- An ai-coustics SDK key from the developer platform.
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
3
Configure your SDK key
Add your ai-coustics SDK key to the backend environment used by your agent:Keep this key on the server. Do not expose it in a browser or mobile client.
.env.local
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 anAnalyzer for
each session and place its collector before VAD and enhancement:
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:
Auth.livekit_cloud() or LiveKit Cloud metering. Generate an
SDK key on the ai-coustics developer platform.
Lifecycle
Every call toModel.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.