按能力

語音合成與轉寫

目前沒有可用模型

目前模型目錄裡沒有模型支援這個介面,本頁僅供參考。

#文字轉語音

/v1/audio/speech 直接回傳音訊位元組——把回應主體存成檔案即可。voice 和 response_format 沿用 OpenAI TTS 參數。

tts.sh
curl https://www.aisplice.store/v1/audio/speech \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{
    "model": "tts-1",
    "voice": "alloy",
    "input": "Hello from the gateway."
  }' --output hello.mp3

#語音轉文字

/v1/audio/transcriptions 是 multipart 請求:上傳音訊檔案和模型名稱。/v1/audio/translations 請求格式相同,回傳英文。

transcribe.sh
curl https://www.aisplice.store/v1/audio/transcriptions \
  -H "Authorization: Bearer $KEY" \
  -F file=@meeting.mp3 \
  -F model=whisper-1

# → {"text": "…transcript…"}

全部欄位:見 API 參考裡的 /v1/audio →

還是沒解決?

把請求 ID 或錯誤訊息傳給我們,我們來查。