Overview
This plugin allows you to use Gradium as a TTS provider for your voice agents.
Installation
Install the plugin from PyPI:
pip install "livekit-agents[gradium]~=1.5"
Authentication
The Gradium plugin requires a Gradium API key.
Set GRADIUM_API_KEY in your .env file.
Usage
Use Gradium 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 gradiumsession = AgentSession(tts=gradium.TTS(),# ... llm, stt, etc.)
Parameters
This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.
voice_idstringDefault: YTpq7expH9539ERJGradium TTS voice id to use.
pronunciation_idstringID of a Gradium pronunciation dictionary to apply when generating speech. To learn more, see Pronunciation Dictionaries.
json_configdict[str, Any]Defines advanced options for Gradium TTS such as speed, rewrite rules, and more. For available options, see the Gradium API docs.
model_namestringDefault: defaultGradium TTS model to use.
model_endpointstringDefault: wss://eu.api.gradium.ai/api/speech/ttsSets the endpoint to be used, switch to us.api.gradium.ai for US region.
Customizing pronunciation
Gradium TTS supports custom pronunciation through pronunciation dictionaries. Pass a dictionary ID to the pronunciation_id parameter to apply it to generated speech. To learn more, see Pronunciation Dictionaries.
Additional resources
The following resources provide more information about using Gradium with LiveKit Agents.