Request
Example:Bearer {{YOUR_API_KEY}}
Body Params application/json
Text to be converted to speech
ID of the reference model o be used for the speech/サウンドモデル生成のためにIDを渡すことができる。
Chunk length to be used for the speech
Whether to normalize the speech, this will reduce the latency but may reduce performance on numbers and dates
Format to be used for the speech Available options: wav, pcm, mp3, opus
MP3 Bitrate to be used for the speech
Opus Bitrate to be used for the speech
Latency to be used for the speech, balanced will reduce the latency but may lead to performance degradation
{
"text": "302.AI是一个汇集全球顶级品牌的AI超市,汇集全球各类顶尖AI模型,提供多种AI机器人,各种AI工具的使用和AI API接入。",
"reference_id": "738d0cc1a3e9430a9de2b544a466a7fc",
"chunk_length": 200,
"normalize": true,
"format": "wav",
"mp3_bitrate": 64,
"opus_bitrate": 32,
"latency": "normal"
}
Request samples
curl --location --request POST 'https://api.302.ai/fish-audio/v1/tts' \
--header 'Authorization: Bearer sk-mfYQzy0XTFfz4P16vRE4gFrKK1Nly4TozsMqbbb9PSiJUvFO' \
--header 'Content-Type: application/json' \
--data-raw '{
"text": "302.AI是一个汇集全球顶级品牌的AI超市,汇集全球各类顶尖AI模型,提供多种AI机器人,各种AI工具的使用和AI API接入。",
"reference_id": "738d0cc1a3e9430a9de2b544a466a7fc",
"chunk_length": 200,
"normalize": true,
"format": "wav",
"mp3_bitrate": 64,
"opus_bitrate": 32,
"latency": "normal"
}'
Responses
application/json Modified at 2025-01-09 09:40:31