TTS(文字转声音)
POST
/fish-audio/v1/tts来自fish audio的文字转语音
官方文档:https://docs.fish.audio/api-reference/endpoint/openapi-v1/text-to-speech
价格:20 PTC / 百万字符
请求参数
Header 参数
Authorization
string
可选
示例值:
Bearer {{YOUR_API_KEY}}
Body 参数application/json
text
string
必需
Text to be converted to speech
reference_id
string
必需
ID of the reference model o be used for the speech/可以传入创建声音模型生成ID
chunk_length
integer
可选
Chunk length to be used for the speech
normalize
boolean
可选
Whether to normalize the speech, this will reduce the latency but may reduce performance on numbers and dates
format
string
可选
Format to be used for the speech Available options: wav, pcm, mp3, opus
mp3_bitrate
integer
可选
MP3 Bitrate to be used for the speech
opus_bitrate
integer
可选
Opus Bitrate to be used for the speech
latency
string
可选
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"
}
示例代码
返回响应
成功(200)
HTTP 状态码: 200
内容格式: JSONapplication/json
数据结构
object {0}
示例
{}
修改于 13 天前