TextToSpeechRequest: TextToSpeechVoiceOptions & {
    bit_rate?: TextToSpeechMp3BitRate;
    container?: TextToSpeechContainer;
    text: string;
}

The body of POST /v1/speech.

Type declaration

  • Optionalbit_rate?: TextToSpeechMp3BitRate

    MP3 bit rate in bits per second: 32000, 48000, 64000 (the default), 96000 or 128000; at most 64000 at a sample_rate of 8000. With encoding: "mp3" only.

  • Optionalcontainer?: TextToSpeechContainer

    raw (the default) or wav, with a PCM or G.711 encoding only.

  • text: string

    1 to 5,000 characters.