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 asyncaisession = 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.
str | TTSModelsOptionalDefault: asyncflow_multilingual_v1.0The AsyncAI TTS model to use. Defaults to "asyncflow_multilingual_v1.0". To learn more, see the AsyncAI documentation.
strOptionalDefault: e0f39dc4-f691-4e78-bba5-5c636692cc04Voice identifier to use for generation. See the voice library for available voice IDs.
strOptionalDefault: NoneThe 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.