跳转到主要内容
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 格式),直接保存为文件即可。