The Speech API provides speech translation capabilities that convert audio from one language to another while preserving meaning and context. This is useful for multilingual content, international communication, and accessibility.
Translate audio from one language to another with high accuracy.
POST /v1/transcription_or_translationaudio_url (required): URL to the audio file or base64-encoded audio as data URIsampling_rate (required): Audio sampling rate in Hz (recommended: 16000)target_language (required): Target language for translation. Supported: "french", "spanish", "japanese", "chinese", "korean", "italian", "portuguese", "german"temperature (optional): Controls randomness in generation. Use 0.0 for deterministic output. Default: 0.0max_tokens (optional): Maximum number of tokens to generate. Default: 1024is_translate (required): Set to true to indicate translation requestReturns a translation result with:
transcript: Transcribed text in the original languagetranslation: Translated text in the target languageThe Speech API supports translation between English and the following languages:
"french")"spanish")"japanese")"chinese")"korean")"italian")"portuguese")"german")temperature: 0.0 for consistent, deterministic translations