Pipecat is a framework for building real-time voice and multimodal agents. ItsDocumentation Index
Fetch the complete documentation index at: https://docs.gradium.ai/llms.txt
Use this file to discover all available pages before exploring further.
GradiumTTSService lets a Pipecat pipeline stream synthesized speech through Gradium’s WebSocket API.
Pipecat Gradium reference
API reference for
GradiumTTSService.Gradium voice example
Complete Pipecat example using Gradium services.
Gradient Bang
Pipecat’s multiplayer game, using Gradium for TTS by default.
Gradium TTS guide
Gradium WebSocket TTS setup and streaming behavior.
Installation
Install Pipecat with the Gradium extra:Basic setup
Create aGradiumTTSService with your API key and a Gradium voice ID. Pipecat’s current pattern is to pass runtime options through GradiumTTSService.Settings(...).
Configuration
Common settings:| Setting | Type | Description |
|---|---|---|
api_key | str | Gradium API key. |
settings.voice | str | Gradium voice ID to synthesize with. |
settings.model | str | Optional Gradium model name. |
settings.language | Language | str | Optional synthesis language. |
url | str | Optional Gradium WebSocket endpoint override. |
json_config | str | Optional JSON string for additional model configuration. |
Gradium TTS in Pipecat outputs audio at 48kHz. Pipecat sets this sample rate automatically.
Runtime behavior
- Streaming audio: Gradium emits audio over a WebSocket, which Pipecat forwards through the active transport.
- Word timestamps: Gradium timestamp events can support synchronized text display.
- Voice switching: Updating the
voicesetting at runtime reconnects the Gradium WebSocket with the new voice. - Connection events:
on_connected,on_disconnected, andon_connection_errorare available for logging and health checks.
Example project
Gradient Bang is Pipecat’s multiplayer game and uses Gradium as the default TTS provider. Its bot environment includesTTS_PROVIDER=gradium, making it a useful larger reference for a real voice-agent application built on Pipecat.