Provides information to the speech translation that specifies
how to process the request.
Attributes
Name
Description
audio_encoding
str
Required. Encoding of audio data. Supported formats:
- linear16
Uncompressed 16-bit signed little-endian samples (Linear
PCM).
- flacflac (Free Lossless Audio Codec) is the recommended
encoding because it is lossless--therefore recognition is
not compromised--and requires only about half the
bandwidth of linear16.
- mulaw
8-bit samples that compand 14-bit audio samples using
G.711 PCMU/mu-law.
- amr
Adaptive Multi-Rate Narrowband codec.
sample_rate_hertz must be 8000.
- amr-wb
Adaptive Multi-Rate Wideband codec. sample_rate_hertz
must be 16000.
- ogg-opus
Opus encoded audio frames in
Ogg __ container.
sample_rate_hertz must be one of 8000, 12000, 16000,
24000, or 48000.
- mp3
MP3 audio. Support all standard MP3 bitrates (which range
from 32-320 kbps). When using this encoding,
sample_rate_hertz has to match the sample rate of the
file being used.
source_language_code
str
Required. Source language code (BCP-47) of
the input audio.
target_language_code
str
Required. Target language code (BCP-47) of
the output.
sample_rate_hertz
int
Optional. Sample rate in Hertz of the audio
data. Valid values are: 8000-48000. 16000 is
optimal. For best results, set the sampling rate
of the audio source to 16000 Hz. If that's not
possible, use the native sample rate of the
audio source (instead of re-sampling).
model
str
Optional. google-provided-model/video and
google-provided-model/enhanced-phone-call are premium
models. google-provided-model/phone-call is not premium
model.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Class TranslateSpeechConfig (0.11.17)\n\nVersion latestkeyboard_arrow_down\n\n- [0.11.17 (latest)](/python/docs/reference/mediatranslation/latest/google.cloud.mediatranslation_v1beta1.types.TranslateSpeechConfig)\n- [0.11.15](/python/docs/reference/mediatranslation/0.11.15/google.cloud.mediatranslation_v1beta1.types.TranslateSpeechConfig)\n- [0.10.0](/python/docs/reference/mediatranslation/0.10.0/google.cloud.mediatranslation_v1beta1.types.TranslateSpeechConfig)\n- [0.9.4](/python/docs/reference/mediatranslation/0.9.4/google.cloud.mediatranslation_v1beta1.types.TranslateSpeechConfig)\n- [0.8.2](/python/docs/reference/mediatranslation/0.8.2/google.cloud.mediatranslation_v1beta1.types.TranslateSpeechConfig)\n- [0.7.1](/python/docs/reference/mediatranslation/0.7.1/google.cloud.mediatranslation_v1beta1.types.TranslateSpeechConfig)\n- [0.6.0](/python/docs/reference/mediatranslation/0.6.0/google.cloud.mediatranslation_v1beta1.types.TranslateSpeechConfig)\n- [0.5.4](/python/docs/reference/mediatranslation/0.5.4/google.cloud.mediatranslation_v1beta1.types.TranslateSpeechConfig)\n- [0.4.0](/python/docs/reference/mediatranslation/0.4.0/google.cloud.mediatranslation_v1beta1.types.TranslateSpeechConfig)\n- [0.3.0](/python/docs/reference/mediatranslation/0.3.0/google.cloud.mediatranslation_v1beta1.types.TranslateSpeechConfig)\n- [0.2.0](/python/docs/reference/mediatranslation/0.2.0/google.cloud.mediatranslation_v1beta1.types.TranslateSpeechConfig)\n- [0.1.1](/python/docs/reference/mediatranslation/0.1.1/google.cloud.mediatranslation_v1beta1.types.TranslateSpeechConfig) \n\n TranslateSpeechConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)\n\nProvides information to the speech translation that specifies\nhow to process the request."]]