Skip to content

API de Synthèse Vocale (POST /v1/audio/speech) ​

Génère de l'audio à partir de texte conformément à la spécification OpenAI /v1/audio/speech.


📥 Corps de la Requête (Request Body) ​

ChampTypeRequisPar défautDescription
modelstringOptionneledgettsIdentifiant du modèle ou du fournisseur (tts-1, edgetts, kokoro)
inputstringOui-Texte à synthétiser (jusqu'à 8 192 caractères)
voicestringOptionnelalloyID ou alias de la voix (alloy, zh-CN-XiaoxiaoNeural)
response_formatstringOptionnelmp3Format : mp3, opus, aac, flac, wav, pcm
speedfloatOptionnel1.0Multiplicateur de vitesse (de 0.25 à 4.0)
streambooleanOptionnelfalseActiver le streaming audio HTTP Chunked

💡 Exemple ​

bash
curl http://localhost:8030/v1/audio/speech \
  -H "Authorization: Bearer sk-onetts-v1-k9L3mX8QZ2sT4vA7wE1rY6u" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "tts-1",
    "input": "OneTTS offre une synthèse vocale ultra-rapide.",
    "voice": "alloy",
    "response_format": "mp3"
  }' \
  --output speech.mp3

Released under the Apache-2.0 License.