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.

Installation

Install the plugin from PyPI:

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

Authentication

The AsyncAI plugin requires an 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="async_flash_v1.0",
)
# ... llm, stt, etc.
)

Parameters

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

modelstr | TTSModelsOptionalDefault: async_flash_v1.0

The AsyncAI TTS model to use. Defaults to "async_flash_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.

languageLanguageCodeOptionalDefault: None

Language code for synthesis. For supported languages, see the AsyncAI documentation.

Additional resources

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