音频 API
语音合成 TTS
POST https://ai.jhdataops.com/v1/audio/speechbash
curl https://ai.jhdataops.com/v1/audio/speech \
-H "Authorization: Bearer sk-xxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"model":"tts-1","input":"你好世界","voice":"alloy"}' \
--output speech.mp3| 参数 | 说明 |
|---|---|
model | 如 tts-1 |
input | 要合成的文本 |
voice | 音色 |
response_format | mp3 / wav 等 |
语音识别 ASR
POST https://ai.jhdataops.com/v1/audio/transcriptions (multipart/form-data)bash
curl https://ai.jhdataops.com/v1/audio/transcriptions \
-H "Authorization: Bearer sk-xxxxxxxx" \
-F model="whisper-1" \
-F file="@audio.mp3"POST /v1/audio/translations 在识别的同时翻译为英文。
实时语音 Realtime
GET wss://ai.jhdataops.com/v1/realtimeWebSocket 低延迟语音对话,用法与 OpenAI Realtime API 一致。
