Skip to main content

Text To Speech

POST 

/v1/models/tts

Generate speech audio from Bambara text.

What does this endpoint do?

  • Converts text into speech audio using Bambara models.
  • Allows selecting different speaker profiles for synthesized speech.

Headers:

  • x-api-key: Your API key for authentication.
  • Content-Type: Must be set to application/json.

Parameters:

  • text (str): The input text to be synthesized into speech.
  • speaker (int): The ID of the speaker profile to use for speech synthesis.

Example Request Body:

{
"text": "Aw ni ce",
"speaker": 1
}

Response:

  • Returns the synthesized audio in WAV format.

Example Response Usage:

  • Save the response content as a .wav file to listen to the generated audio.

How to use this endpoint?

  • Provide the text and speaker parameters in the request body.
  • Use the returned WAV file in your applications, or save it for playback.

Caution:

  • The response is a binary stream (audio), so ensure your application can handle binary responses.

Returns: Response: The synthesized audio in WAV format.

Request

Responses

Successful Response