ai-coustics LiveKit plugin for Python
Audio enhancement, voice activity detection, and audio-quality analysis for LiveKit Agents, backed by the public
aic-sdk package.
Installation
This package is an alternative to
livekit-plugins-ai-coustics, not an extension of it. Do not install both packages because they provide the samelivekit.plugins.ai_cousticsimport path.
pip uninstall livekit-plugins-ai-coustics
pip install ai-coustics-livekit-plugin
export AIC_SDK_LICENSE=...
Migrating from the official LiveKit plugin
The Python import remains livekit.plugins.ai_coustics, but the public APIs are different:
| Official LiveKit plugin | This package |
|---|---|
audio_enhancement(...) |
Processor(model=...) |
EnhancerModel.* |
An SDK Model loaded from a provisioned model file |
ModelParameters or update_model_parameters(...) |
processor.get_context().set_parameter(...) |
VAD() and VadSettings |
VAD(model=..., vad_parameters=VADParameters(...)) |
Auth.livekit_cloud() or Auth.ai_coustics_api(...) |
AIC_SDK_LICENSE or license_key= |
Before:
processor = ai_coustics.audio_enhancement(
model=ai_coustics.EnhancerModel.QUAIL_L,
)
vad = ai_coustics.VAD()
After loading the SDK models as described below:
processor = ai_coustics.Processor(model=enhancement_model)
vad = ai_coustics.VAD(model=vad_model)
frame_processor = ai_coustics.FrameProcessorChain(vad.processor, processor)
This package still uses a dedicated SDK VAD model. Like the official plugin, inference runs in the
RoomIO frame-processor path and the VAD streams consume frame metadata. Provision a separate VAD
model and install vad.processor as described below. LiveKit Cloud authentication is not carried
over; obtain an ai-coustics SDK license before migrating.
Model provisioning
Download models during deployment or container setup:
from livekit.plugins import ai_coustics
enhancement_path = ai_coustics.Model.download("quail-vf-2.2-l-16khz", "./models")
vad_path = ai_coustics.Model.download("vad-2.1-xxs-16khz", "./models")
analysis_path = ai_coustics.Model.download("tyto-1.1-l-16khz", "./models")
Enhancement and VAD models are different model types. Make the returned paths available to your worker, then load each model once per worker process:
enhancement_model = ai_coustics.Model.from_file(enhancement_path)
vad_model = ai_coustics.Model.from_file(vad_path)
analysis_model = ai_coustics.Model.from_file(analysis_path)
Usage
Create a Processor and VAD for each agent session:
from livekit.agents import AgentSession, room_io
from livekit.plugins import ai_coustics
processor = ai_coustics.Processor(model=enhancement_model)
vad = ai_coustics.VAD(model=vad_model)
frame_processor = ai_coustics.FrameProcessorChain(vad.processor, processor)
session = AgentSession(
vad=vad,
# ... stt, llm, tts
)
await session.start(
# ... agent, room
room_options=room_io.RoomOptions(
audio_input=room_io.AudioInputOptions(noise_cancellation=frame_processor),
),
)
vad.processor must be installed in the noise_cancellation path whenever the VAD is used. Put
it first in the chain so it runs on original microphone audio before enhancement. All VAD streams
read the resulting immutable metadata, so the SDK model runs only once per audio block.
For VAD without enhancement, use noise_cancellation=vad.processor. For enhancement without VAD,
use noise_cancellation=processor.
Audio-quality analysis
Create an Analyzer, install its collector in RoomIO's audio path, and subscribe to its results:
analyzer = ai_coustics.Analyzer(
model=analysis_model,
analysis_interval=5.0, # seconds; 5 is the default
)
@analyzer.on("analysis_result")
def on_analysis(event: ai_coustics.AnalysisEvent) -> None:
print(event.result.risk_score)
await session.start(
# ... agent, room
room_options=room_io.RoomOptions(
audio_input=room_io.AudioInputOptions(
noise_cancellation=analyzer.collector,
),
),
)
The Analyzer receives audio through analyzer.collector; constructing the analyzer without
installing its collector does not feed it any room audio.
Results are not logged by the plugin; log or handle them in the callback.
Combining frame processors
Use FrameProcessorChain to run any number of processors in the same RoomIO audio path. For
example, this runs VAD inference and analysis on the raw input before enhancement:
frame_processor = ai_coustics.FrameProcessorChain(
vad.processor,
analyzer.collector,
processor,
)
await session.start(
# ... agent, room
room_options=room_io.RoomOptions(
audio_input=room_io.AudioInputOptions(
noise_cancellation=frame_processor,
),
),
)
FrameProcessorChain runs its processors in order. Keep vad.processor first: it annotates the
original frame while preserving its audio. We recommend placing analyzer.collector before
processor; measuring raw input makes it easier to understand how input audio quality affects the
rest of the pipeline.
This still uses LiveKit's noise_cancellation slot as a temporary integration. RoomIO owns the
chain and closes the processor, collector, and analyzer together.
Configuration
Set the enhancement level through the Processor context, and configure all SDK VAD parameters on the VAD factory:
processor.get_context().set_parameter(
ai_coustics.ProcessorParameter.EnhancementLevel,
0.8,
)
vad.set_parameters(
ai_coustics.VADParameters(
sensitivity=0.5,
speech_hold_duration=0.25,
minimum_speech_duration=0.05,
)
)
VAD durations are specified in seconds. See the Python SDK reference and VAD guide for parameter ranges, model support, and further details.
Set AIC_SDK_LICENSE or pass license_key= to the constructor. Create a new Processor for each
concurrent room; RoomIO closes it with the input stream.
Models must be provisioned explicitly. This package does not support
python -m livekit.agents download-files.
Metadata
Release files for ai-coustics-livekit-plugin 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ai_coustics_livekit_plugin-0.2.0.tar.gz | 34.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ai_coustics_livekit_plugin-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 59.8 kB
Release files / ai_coustics_livekit_plugin-0.2.0.tar.gz
| Download URL | ai_coustics_livekit_plugin-0.2.0.tar.gz |
|---|---|
| Size | 34.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8ff7a748bcab026ae43f7d15c1d6c33f61eb41605e25d1a04ad2bec59b8b6aa
|
|
BLAKE2b-256 checksum How to use checksums |
22a967627f163114aa5808e6e646f4f9d9591861d300ec371499afbc5f9e371b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency logRelease files / ai_coustics_livekit_plugin-0.2.0-py3-none-any.whl
| Download URL | ai_coustics_livekit_plugin-0.2.0-py3-none-any.whl |
|---|---|
| Size | 25.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7702ab6f5792cd2736b7e3c9f5a5b632a51a237612696ef8cf191949c5c7e711
|
|
BLAKE2b-256 checksum How to use checksums |
3d372dbd2d3376c8b6e2584e859d667ab68a81a882f151045fe94c6d9365d301
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 14, 2026.
Transparency log