Skip to main content

Synthesise Speech

POST 

/openai/v1/audio/speech

Synthesise speech from Bambara text.

Mirrors POST /v1/audio/speech, so client.audio.speech.create() works unchanged.

Parameters:

  • input: the text to synthesise.
  • model: jifili-1 (default), djelia-tts-v2 or djelia-tts-v1.
  • voice: moussa, sekou or seydou. OpenAI's voice names are accepted as aliases. jifili-1 serves moussa only, and answers 400 unsupported_voice for the others.
  • response_format: jifili-1 serves mp3 (default), wav, pcm, opus, ulaw, alaw, l16_8000, l16_16000 and fmp4 (AAC in fragmented MP4); it answers 422 invalid_request for the legacy-only names flac, aac, wav_8k and ulaw_8k. The older models serve mp3, opus, aac, flac, wav, pcm and the telephony formats wav_8k and ulaw_8k, and answer 400 for a format their encoder lacks.
  • stream_format: audio (default) for raw bytes, sse for speech.audio.delta events.

Djelia extension. TTS v2 is prompt-steerable, which the fixed OpenAI voice enum cannot express. Pass a free-text description to reach it:

client.audio.speech.create(
model="djelia-tts-v2",
input="Aw ni ce, i ka kene wa?",
voice="moussa",
extra_body={"djelia": {"description": "speaks slowly, warm and reassuring"}},
)

jifili-1 selects a voice by name, so djelia.description does not reach it. Its sampling is steered by djelia.temperature, djelia.top_p and djelia.repetition_penalty; each one left out keeps the model's own default.

A synthesis that fails once it is under way ends the stream where it stopped, since the status line has already been sent.

Ignored: speed, instructions (use djelia.description instead).

Request

Responses

The synthesised audio in the requested response_format. stream_format="sse" returns speech.audio.delta events instead.