Overview
This plugin allows you to use Gradium as a TTS provider for your voice agents.
Quick reference
This section includes a brief overview of the Gradium TTS plugin.
Installation
Install the plugin from PyPI:
pip install "livekit-agents[gradium]~=1.3"
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.
stringOptionalDefault: YTpq7expH9539ERJGradium TTS voice id to use.
dict[str, Any]OptionalDefines advanced options for Gradium TTS such as speed, rewrite rules, and more. See the Gradium API docs for details on available options.
stringOptionalDefault: defaultGradium TTS model to use.
stringOptionalDefault: wss://eu.api.gradium.ai/api/speech/ttsSets the endpoint to be used, switch to us.api.gradium.ai for US region.
Additional resources
The following resources provide more information about using Gradium with LiveKit Agents.