Skip to content

Sprachsynthese-API (POST /v1/audio/speech) ​

Generiert Audio aus Text gemäß der OpenAI /v1/audio/speech-Spezifikation.


📥 Request-Body ​

FeldTypErforderlichStandardBeschreibung
modelstringOptionaledgettsModell- oder Provider-ID (tts-1, edgetts, kokoro)
inputstringJa-Zu synthetisierender Text (bis zu 8.192 Zeichen)
voicestringOptionalalloyStimmen-ID oder Alias (alloy, zh-CN-XiaoxiaoNeural)
response_formatstringOptionalmp3Audioformat: mp3, opus, aac, flac, wav, pcm
speedfloatOptional1.0Geschwindigkeitsmultiplikator (0.25 bis 4.0)
streambooleanOptionalfalseHTTP-Chunked-Audiostreaming aktivieren

💡 Beispiel ​

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 liefert ultraschnelle Sprachsynthese.",
    "voice": "alloy",
    "response_format": "mp3"
  }'   --output speech.mp3

Released under the Apache-2.0 License.