音频

语音合成(文本转语音)与转录(语音转文本)。

语音合成

http
POST /v1/audio/speech
json
{
  "text": "Bonjour, ceci est un test de synthese vocale.",
  "voice": "alloy",
  "model": null,
  "routing_strategy": "auto"
}

voice 取决于所选的供应商:OpenAI 的名称(alloyecho 等)与 ElevenLabs 的语音 ID 不可互换——如果您需要特定的音色,请明确指定 model

json
{
  "audio": "https://cdn.uploadscenter.com/file_...",
  "model": "eleven_multilingual_v2",
  "provider": "elevenlabs"
}

转录

http
POST /v1/audio/transcriptions
json
{
  "audio_url": "https://exemple.com/enregistrement.mp3",
  "language": "fr",
  "model": null,
  "routing_strategy": "auto"
}
json
{
  "text": "Transcription du contenu audio.",
  "model": "whisper-1",
  "provider": "openai"
}

供应商

OpenAI(TTS + Whisper)、ElevenLabs(高质量多语言语音合成 + 转录)。