Audio

audio

Domain types

AudioModel = "whisper-1"
AudioResponseFormat = "json" | "text" | "srt" | 2 more...
Audio

Speech

audio.speech

Methods

Create Speech -> unknown
post/audio/speech

Generates audio from the input text.

Security
Bearer Auth

Example: Authorization: Bearer My API Key

Body parameters
input: string

The text to generate audio for. The maximum length is 4096 characters.

model: string |

One of the available TTS models: tts-1 or tts-1-hd

voice: "alloy" | "echo" | "fable" | 3 more...

The voice to use when generating the audio. Supported voices are alloy, echo, fable, onyx, nova, and shimmer. Previews of the voices are available in the Text to speech guide.

response_format?: "mp3" | "opus" | "aac" | 3 more...

The format to audio in. Supported formats are mp3, opus, aac, flac, wav, and pcm.

speed?: number

The speed of the generated audio. Select a value from 0.25 to 4.0. 1.0 is the default.

Request example

Domain types

SpeechModel = "tts-1" | "tts-1-hd"
Audio

Transcriptions

audio.transcriptions

Methods

Create Transcription -> |
post/audio/transcriptions

Transcribes audio into the input language.

Domain types

Transcription = { text }
TranscriptionSegment = { id, avg_logprob, compression_ratio, 7 more... }
TranscriptionVerbose = { duration, language, text, 2 more... }
TranscriptionWord = { end, start, word }
Audio

Translations

audio.translations

Methods

Create Translation -> |
post/audio/translations

Translates audio into English.

Domain types

Translation = { text }
TranslationVerbose = { duration, language, text, 1 more... }