Overview
This plugin allows you to use Fish Audio as a TTS provider for your voice agents.
Installation
Install the plugin from PyPI:
uv add "livekit-agents[fishaudio]~=1.6"
Authentication
The Fish Audio plugin requires an API key from Fish Audio .
Set FISH_API_KEY in your .env.local file.
Usage
Use Fish Audio 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 fishaudiosession = AgentSession(tts=fishaudio.TTS(model="s2.1-pro",voice_id="933563129e564b19a115bedd57b7406a",),# ... llm, stt, etc.)
Voices
Fish Audio identifies each voice by a reference ID. Browse the Fish Audio playground to find a voice, or create your own custom voice model, then copy its ID into the voice_id parameter.
Parameters
This section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.
modelstringDefault: s2.1-proFish Audio TTS model to use. Set to s1, s2-pro, or s2.1-pro.
voice_idstringID of the voice (reference ID) to use. Defaults to a built-in voice. See Voices to find or create voice IDs.
output_formatstringDefault: wavAudio output format. Set to wav, pcm, mp3, or opus.
latency_modestringDefault: balancedTradeoff between synthesis latency and quality. Set to normal, balanced, or low.
speedfloatSpeaking rate multiplier from 0.5 to 2.0, where 1.0 is normal. Lower values slow speech down and higher values speed it up. When unset, the voice uses its natural pace.
volumefloatLoudness adjustment in decibels from -20 to 20, where 0 is the voice's natural level. Positive values make speech louder and negative values make it quieter. When unset, the level stays the same.
Additional resources
The following resources provide more information about using Fish Audio with LiveKit Agents.