Text to Speech - SunoAI Bark API

SunoAI bark powered scalable API for speech generation

Access scalable, affordable and highly available REST API for on-demand text to speech generation using SunoAI Bark AI Model.

Using this API you can perform speech generation from provided text inputs in more than 10 languages.

Few benefits of performing text to speech generation using Monster API:

✅ Optimised API for quick speech generation

✅ Very low cost speech generation

✅ Offers complete flexibility to generate speech in different languages and control the generation quality

Monster API can be accessed via this workflow:

  1. Send request API: Use this API to send a request for audio generation

  2. Fetch status API: Use this API to fetch status of your audio generation request

Refer to our API docs for Text to Speech use-case.

# Example CURL Request for sending text to speech generation request

curl --location 'https://api.monsterapi.ai/apis/add-task' \
--header 'x-api-key: 123' \
--header 'Authorization: Bearer 456' \
--data '{
    "model": "sunoai-bark",
    "data": {
        "prompt": "What is the meaning of life?",
        "speaker": "en_speaker_2",
        "sample_rate": 26000,
        "text_temp": 0.6,
        "waveform_temp": 1.0
# Example CURL Request for getting status of your request

curl --location 'https://api.monsterapi.ai/apis/task-status' \
--header 'x-api-key: 123' \
--header 'Authorization: Bearer 456' \
--data '{
    "process_id" :  "3637c25d-1784-11ee-b7c0-7d12dc7f87a0"

These 2 API calls are enough to get a generated audio file.

Description of parameters for sending SunoAI Bark API request:

  1. "prompt":

    1. Required Parameter.

    2. Prompt is a text string that is going to be converted to an audio file

  2. "speaker":

    1. Optional Parameter (default: 'en_speaker_1' i.e. english speaker 1)

    2. Defines the language and speaker for speech generation.

    3. Format required: LANGUAGE_speaker_SPEAKER_NUMBER. Each language has 9 speakers. For example:

      1. hi_speaker_4 is Hindi speaker 4.

      2. pt_speaker_2 is Polish speaker 2

  3. "sample_rate":

    1. Optional Parameter (Default: 25000)

    2. Sampling rate for output audio

  4. "text_temp":

    1. Optional Parameter (Default: 0.5)

    2. Temperature setting for text prompt. Supported range: 0.1 to 1.0

  5. "waveform_temp":

    1. Optional Parameter (Default: 0.5)

    2. Temperature setting for audio waveform. Supported range: 0.1 to 1.0

Example audio files generated using SunoAI Bark Monster API:

English audio generation example:

"prompt": "What a beautiful day it is!",
"speaker": "en_speaker_4",
"sample_rate": 26000,
"text_temp": 0.7,
"waveform_temp": 1.0


Spanish audio generation example:

"prompt": "Como estas mi amigo",
"speaker": "es_speaker_4",
"sample_rate": 26000,
"text_temp": 0.7,
"waveform_temp": 1.0


Last updated