Audio (TTS & STT)
Audio (TTS & STT)
Audio
Text-to-Speech
client.audio.synthesize sends POST /v1/audio/speech and returns raw audio bytes.
Async
SpeechParams fields
Speech-to-Text (Transcription)
client.audio.transcribe sends POST /v1/audio/transcriptions as a multipart upload and returns a TranscriptionResponse.
TranscriptionParams key fields
Translation
client.audio.translate sends POST /v1/audio/transcriptions/translate and returns the audio transcribed and translated to English.
Translation (to English)
client.audio.audio_translate sends POST /v1/audio/translations and returns the audio translated directly to English. This is a distinct endpoint from the transcribe-and-translate helper above.
Async
AudioTranslationsParams fields
The response .text field contains the English translation.
List Voices
client.audio.list_voices sends GET /v1/audio/voices.
ListVoicesParams fields
Get Voice
client.audio.get_voice sends GET /v1/audio/voices/{voice_id}.