跳轉到主要內容
POST
/
v1
/
audio
/
speech
curl https://qingbo.dev/v1/audio/speech \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tts-1",
    "voice": "nova",
    "input": "欢迎使用 WaveAPI 文字转语音服务。"
  }' \
  --output output.mp3
同步介面 — 請求完成後直接回傳音訊串流。
curl https://qingbo.dev/v1/audio/speech \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tts-1",
    "voice": "nova",
    "input": "欢迎使用 WaveAPI 文字转语音服务。"
  }' \
  --output output.mp3

可用模型

模型 ID說明
tts-1標準品質,延遲低
tts-1-hd高清品質

請求參數

model
string
必填
模型 ID:tts-1tts-1-hd
input
string
必填
要轉換的文字內容
voice
string
預設值:"alloy"
語音類型:alloyechofableonyxnovashimmer

回應

回傳音訊檔案串流(MP3 格式),直接儲存為檔案即可。