Fish Audio

Updated

Integrate Fish Audio TTS with the Conversational AI Engine.

Fish Audio provides text-to-speech (TTS) with flexible models and high-quality synthetic voices.

Info

This integration is fully supported for use with Conversational AI Engine. While it has completed functional validation, it is newer to the platform, and additional provider-specific edge cases may be identified as usage scales across a broader range of applications and workloads.

Sample configuration

The following examples show how to configure Fish Audio TTS when starting a conversational AI agent.

from agora_agent import Agent
from agora_agent.agentkit.vendors import FishAudioTTS

# client is your configured Agora client
agent = (
    Agent(client)
    .with_stt(...)  # configure your STT vendor
    .with_llm(...)  # configure your LLM vendor
    .with_tts(FishAudioTTS(
        key='your-fishaudio-key',
        reference_id='<voice_model_id>',
        backend='speech-1.5',
    ))
)
import { Agent, FishAudioTTS } from 'agora-agents';

// client is your configured Agora client
const agent = new Agent({ client })
  .withStt(/* configure your STT vendor */)
  .withLlm(/* configure your LLM vendor */)
  .withTts(new FishAudioTTS({
    key: 'your-fishaudio-key',
    referenceId: '<voice_model_id>',
    backend: 'speech-1.5',
  }));
import "github.com/AgoraIO/agora-agents-go/v2/agentkit/vendors"

// client is your configured Agora client
agent := agentkit.NewAgent(client).WithStt(/* configure your STT vendor */).
  WithLlm(/* configure your LLM vendor */).
  WithTts(
    vendors.NewFishAudioTTS(vendors.FishAudioTTSOptions{
        Key:         "your-fishaudio-key",
        ReferenceID: "<voice_model_id>",
        Backend:     "speech-1.5",
    }),
)

Use the following tts configuration in your request:

"tts": {
  "vendor": "fishaudio",
  "params": {
    "api_key": "<fishaudio_key>",
    "reference_id": "<voice_model_id>",
    "backend": "speech-1.5"
  }
}

Caution

The parameters listed on this page are validated for use with Conversational AI Engine. Required parameters must be provided as documented. Any additional parameters are passed through directly to the underlying vendor without validation. For a full list of supported options, refer to the Fish Audio documentation.

Key parameters

paramsrequired
api_keystring
required

The Fish Audio API key used to authenticate requests. You must provide a valid key for the service to function.

reference_idstring
required

The identifier of the voice model to use for speech synthesis.

backendstring
required

The backend model version to use. For example, speech-1.5.