Class TranslateSpeechConfig (0.3.0)

TranslateSpeechConfig(mapping=None, *, ignore_unknown_fields=False, **kwargs)

Provides information to the speech translation that specifies how to process the request.

Attributes

NameDescription
audio_encoding str
Required. Encoding of audio data. Supported formats: - linear16 Uncompressed 16-bit signed little-endian samples (Linear PCM).
source_language_code str
Required. Source language code (BCP-47) of the input audio.
alternative_source_language_codes Sequence[str]
Optional. A list of up to 3 additional language codes (BCP-47), listing possible alternative languages of the supplied audio. If alternative source languages are listed, speech translation result will translate in the most likely language detected including the main source_language_code. The translated result will include the language code of the language detected in the 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). This field can only be omitted for FLAC and WAV audio files.
model str
Optional.