cURL
curl --request POST \ --url https://api.tkhub.ai/v1/v1/audio/speech \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "model": "tts-1", "input": "<string>", "voice": "alloy", "response_format": "mp3", "speed": 1 } '
"<string>"
将文本转换为音频
使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx
Authorization: Bearer sk-xxxxxx
"tts-1"
要转换的文本
4096
alloy
echo
fable
onyx
nova
shimmer
mp3
opus
aac
flac
wav
pcm
0.25 <= x <= 4
成功生成音频
The response is of type file.
file
Was this page helpful?