Skip to main content

AsyncAI TTS plugin guide

How to use the AsyncAI TTS plugin for LiveKit Agents.

Available in
Python

Overview

This plugin allows you to use AsyncAI as a TTS provider for your voice agents.

Quick reference

This section provides a quick reference for the AsyncAI TTS plugin. For more information, see Additional resources.

Installation

Install the plugin from PyPI:

uv add "livekit-agents[asyncai]~=1.3"

Authentication

The AsyncAI plugin requires a AsyncAI API key.

Set ASYNCAI_API_KEY in your .env file.

Usage

Use AsyncAI TTS within an AgentSession or as a standalone speech generator. For example, you can use this TTS in the Voice AI quickstart.

from livekit.plugins import asyncai
session = AgentSession(
tts=asyncai.TTS(
model="asyncflow_multilingual_v1.0",
)
# ... llm, stt, etc.
)

Parameters

This section describes some of the parameters you can set when you create a AsyncAI TTS. See the plugin reference links in the Additional resources section for a complete list of all available parameters.

modelstr | TTSModelsOptionalDefault: asyncflow_multilingual_v1.0

The AsyncAI TTS model to use. Defaults to "asyncflow_multilingual_v1.0". To learn more, see the AsyncAI documentation.

voicestrOptionalDefault: e0f39dc4-f691-4e78-bba5-5c636692cc04

Voice identifier to use for generation. See the voice library for available voice IDs.

languagestrOptionalDefault: None

The language code for synthesis. To learn more, see the list of supported language codes for language in the AsyncAI documentation.

Additional resources

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