TTS(文字转声音)
POST
/fish-audio/v1/tts来自fish audio的文字转语音
官方文档:https://docs.fish.audio/api-reference/endpoint/openapi-v1/text-to-speech
价格:20 PTC / 百万字符
请求参数
Header Params
Authorization
string
optional
Example:
Bearer {{YOUR_API_KEY}}
Body Params application/json
text
string
required
Text to be converted to speech
reference_id
string
required
ID of the reference model o be used for the speech/可以传入创建声音模型生成ID
chunk_length
integer
optional
Chunk length to be used for the speech
normalize
boolean
optional
Whether to normalize the speech, this will reduce the latency but may reduce performance on numbers and dates
format
string
optional
Format to be used for the speech Available options: wav, pcm, mp3, opus
mp3_bitrate
integer
optional
MP3 Bitrate to be used for the speech
opus_bitrate
integer
optional
Opus Bitrate to be used for the speech
latency
string
optional
Latency to be used for the speech, balanced will reduce the latency but may lead to performance degradation
Example
{
"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
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
Data Schema
object {0}
Example
{}
Last modified: 2 个月前