Skip to main content
Integrate ai-coustics speech enhancement into your LiveKit voice agents in minutes. The livekit-plugins-ai-coustics package provides real-time noise cancellation optimized for human-to-machine audio, improving transcription accuracy for your AI agents.
Requires a LiveKit Cloud account for authentication, no ai-coustics SDK key needed.

Setup Guide

Follow these steps to create a new LiveKit agent project with ai-coustics speech enhancement.
1

Create a LiveKit Cloud account

Sign up at LiveKit Cloud if you don’t already have an account. Note: A LiveKit Cloud account is required for authentication. The plugin runs locally on your infrastructure.
2

Install the LiveKit CLI

Install the LiveKit CLI tool for your platform.
3

Authenticate the CLI

lk cloud auth
4

Create a new agent project

lk app create --template agent-starter-python my-agent
cd my-agent
5

Add the ai-coustics plugin

uv add livekit-plugins-ai-coustics
6

Install dependencies

uv sync
7

Download model files

uv run src/agent.py download-files
8

Enable speech enhancement

Open src/agent.py and update the session.start() call to include audio enhancement:
from livekit.plugins import ai_coustics

session = AgentSession(
  vad=ai_coustics.VAD(),  # Add ai-coustics VAD to session setup
  stt=inference.STT(model="deepgram/nova-3", language="multi"),
  llm=inference.LLM(model="openai/gpt-4.1-mini"),
  tts=inference.TTS(
      model="cartesia/sonic-3", voice="9626c31c-bec5-4cca-baa8-f8ba9e84c8bc"
  ),
)

await session.start(
    agent=Assistant(),
    room=ctx.room,
    room_options=room_io.RoomOptions(
        audio_input=room_io.AudioInputOptions(  
              # Add ai-coustics audio enhancement to audio input options
              noise_cancellation=ai_coustics.audio_enhancement(
                # - EnhancerModel.QUAIL_VF_L  (best for isolating the foreground speaker)
                # - EnhancerModel.QUAIL_L     (best for multiple speakers)
                model=ai_coustics.EnhancerModel.QUAIL_VF_L,
                # - enhancement_level = 0.5 (conservative, foreground speech is always preserved)
                # - enhancement_level = 0.8 (balanced, optimal word error rate on challenging data)
                # - enhancement_level = 1.0 (aggressive, maximum suppression of interfering speech)
                # More info: https://docs.ai-coustics.com/guides/speech-enhancement-for-asr
                model_parameters=ai_coustics.ModelParameters(enhancement_level=0.8),
            ),
        )
    ),
)
9

Run the agent

uv run python src/agent.py console
Your agent is now running with ai-coustics Quail Voice Focus. You can start talking to it directly in the console. The Voice Focus models will elevate the foreground speaker while suppressing both interfering speech and background noise.
10

Voice Focus and Multi-Speaker Support

You can use Quail Voice Focus and Quail for multi-speaker scenarios in this integration. Support for Voice Activity Detection will be added in the future.

Next Steps

Plugin on PyPI

Discover the LiveKit Plugin documentation.

Quail & Voice Focus

Learn about Quail and Voice Focus models for LiveKit.