音訊模型
建立語音
使用 CometAPI POST /v1/audio/speech 搭配 TTS 模型將文字轉換為擬真的音訊。可從 10 種聲音中選擇、調整速度,並輸出為 MP3、OPUS、AAC、FLAC、WAV 或 PCM。
POST
Python (OpenAI SDK)
Documentation Index
Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt
Use this file to discover all available pages before exploring further.
授權
Bearer token authentication. Use your CometAPI key.
主體
application/json
The TTS model to use. Choose a current speech model from the Models page.
The text to generate audio for. Maximum length is 4096 characters.
Maximum string length:
4096The voice to use for speech synthesis.
可用選項:
alloy, ash, ballad, coral, echo, fable, onyx, nova, sage, shimmer The audio output format.
可用選項:
mp3, opus, aac, flac, wav, pcm The speed of the generated audio. Select a value between 0.25 and 4.0.
必填範圍:
0.25 <= x <= 4回應
200 - audio/mpeg
The audio file content.
The response is of type file.