Amazon Transcribe STT integration guide

How to use the Amazon Transcribe STT plugin for LiveKit Agents.

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

Quick reference

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

Installation

Install the plugin from PyPI:

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

Authentication

The Amazon Transcribe plugin requires an AWS API key.

Set the following environment variables in your .env file:

AWS_ACCESS_KEY_ID=<aws-access-key-id>
AWS_SECRET_ACCESS_KEY=<aws-secret-access-key>
AWS_DEFAULT_REGION=<aws-deployment-region>

Usage

Use Amazon Transcribe 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 aws
session = AgentSession(
stt = aws.STT(
session_id="my-session-id",
language="en-US",
vocabulary_name="my-vocabulary",
vocab_filter_name="my-vocab-filter",
vocab_filter_method="mask",
),
# ... llm, tts, etc.
)

Parameters

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

speech_regionstringOptionalDefault: us-east-1Env: AWS_DEFAULT_REGION

The region of the AWS deployment. Required if the environment variable isn't set.

languagestringOptionalDefault: en-US

The language of the audio. For a full list of supported languages, see the Supported languages page.

vocabulary_namestringOptionalDefault: None

Name of the custom vocabulary you want to use when processing your transcription. To learn more, see Custom vocabularies.

session_idstringOptional

Name for your transcription session. If left empty, Amazon Transcribe generates an ID and returns it in the response.

vocab_filter_namestringOptionalDefault: None

Name of the custom vocabulary filter that you want to use when processing your transcription. To learn more, see Using custom vocabulary filters to delete, mask, or flag words.

vocab_filter_methodstringOptionalDefault: None

Display method for the vocabulary filter. To learn more, see Using custom vocabulary filters to delete, mask, or flag words.

Additional resources

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

Voice AI quickstart

Get started with LiveKit Agents and Amazon Transcribe.