メインコンテンツへスキップ
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 フォーマット)を返します。そのままファイルとして保存してください。