fishaudio plugin, providing text-to-speech synthesis with support for both chunked and real-time WebSocket streaming modes.
Prerequisites
- A Fish Audio account with an API key
- Python 3.9 or higher
Installation
Install LiveKit Agents with Fish Audio support:Configuration
Set your Fish Audio API key as an environment variable:Basic usage
Add Fish Audio TTS to your LiveKit agent:Key parameters
| Parameter | Description |
|---|---|
api_key | Your Fish Audio API key (or use FISH_API_KEY env var) |
model | TTS model/backend to use (default: s1) |
reference_id | Voice model ID from the Fish Audio library |
output_format | Audio format: pcm, mp3, wav, or opus (default: pcm) |
sample_rate | Audio sample rate in Hz (default: 24000) |
num_channels | Number of audio channels (default: 1) |
base_url | Custom API endpoint (default: https://api.fish.audio) |
latency_mode | normal (~500ms) or balanced (~300ms, default) |



