Audio

Generates audio from the input text.

Changed on
post/openai/v1/audio/speech

Request

  • Base URL
    https://api.groq.com
  • URL
    https://api.groq.com/openai/v1/audio/speech
  • Auth
    HTTP bearer

Request body

inputstring required

The text to generate audio for.

voicestring required

The voice to use when generating the audio. List of voices can be found here.

response_format'flac' | 'mp3' | 'mulaw' | 'ogg' | 'wav'

The format of the generated audio. Supported formats are flac, mp3, mulaw, ogg, wav.

sample_rate8000 | 16000 | 22050 | 24000 | 32000 | 44100 | 48000

The sample rate for generated audio

speednumber

The speed of the generated audio.

Example request

{
  "input": "The quick brown fox jumped over the lazy dog",
  "voice": "Fritz-PlayAI",
  "sample_rate": 48000,
  "speed": 1
}

Response

OK

Changes

    • info

      added the new optional request property

    • info

      the request property default value changed from wav to mp3

    • info

      added the new flac enum value to the request property

    • info

      added the new mulaw enum value to the request property

    • info

      added the new ogg enum value to the request property

    • info

      the request property's max was increased from 1.00 to 5.00

    • info

      the request property's min was decreased from 1.00 to 0.50

    • info

      added subschema #2 to the request property anyOf list