AssemblyAI integration guide

How to use the AssemblyAI STT plugin for LiveKit Agents.

Overview

AssemblyAI provides a streaming STT service with high accuracy, realtime transcription. You can use the open source AssemblyAI plugin for LiveKit Agents to build voice AI with fast, accurate transcription.

Quick reference

This section provides a brief overview of the AssemblyAI STT plugin. For more information, see Additional resources.

Installation

Install the plugin from PyPI:

pip install "livekit-agents[assemblyai]~=1.0"

Authentication

The AssemblyAI plugin requires an AssemblyAI API key.

Set ASSEMBLYAI_API_KEY in your .env file.

Usage

Use AssemblyAI STT in an AgentSession or as a standalone transcription service. For example, you can use this STT in the Voice AI quickstart.

from livekit.plugins import assemblyai
session = AgentSession(
stt = assemblyai.STT(
word_boost=["LiveKit"],
),
# ... llm, tts, etc.
)

Parameters

This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.

word_boostlist[string]Optional

List of custom vocabulary. Max 2500 characters. To learn more, see Add custom vocabulary.

disable_partial_transcriptsboolOptionalDefault: False

Disable partial transcripts. To learn more, see Disable partial transcripts.

end_utterance_silence_thresholdintOptionalDefault: 500

Duration of silence to wait after the last utterance in milliseconds. To learn more, see Configure the threshold for automatic utterance detection.

Additional resources

The following resources provide more information about using AssemblyAI with LiveKit Agents.

Voice AI quickstart

Get started with LiveKit Agents and AssemblyAI.