public static final class TranslateSpeechConfig.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<TranslateSpeechConfig.Builder> implements TranslateSpeechConfigOrBuilder
Provides information to the speech translation that specifies how to process the request.Protobuf type
google.cloud.mediatranslation.v1beta1.TranslateSpeechConfiggetAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateSpeechConfig.Builder>public TranslateSpeechConfig.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateSpeechConfig.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateSpeechConfig.Builder>public TranslateSpeechConfig getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic TranslateSpeechConfig build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic TranslateSpeechConfig buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic TranslateSpeechConfig.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateSpeechConfig.Builder>public TranslateSpeechConfig.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateSpeechConfig.Builder>public TranslateSpeechConfig.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateSpeechConfig.Builder>public TranslateSpeechConfig.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateSpeechConfig.Builder>public TranslateSpeechConfig.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateSpeechConfig.Builder>public TranslateSpeechConfig.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateSpeechConfig.Builder>public TranslateSpeechConfig.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<TranslateSpeechConfig.Builder>public TranslateSpeechConfig.Builder mergeFrom(TranslateSpeechConfig other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateSpeechConfig.Builder>public TranslateSpeechConfig.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<TranslateSpeechConfig.Builder>IOExceptionpublic String getAudioEncoding()
Required. Encoding of audio data. Supported formats: - `linear16` Uncompressed 16-bit signed little-endian samples (Linear PCM).
string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];getAudioEncoding in interface TranslateSpeechConfigOrBuilderpublic com.google.protobuf.ByteString getAudioEncodingBytes()
Required. Encoding of audio data. Supported formats: - `linear16` Uncompressed 16-bit signed little-endian samples (Linear PCM).
string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];getAudioEncodingBytes in interface TranslateSpeechConfigOrBuilderpublic TranslateSpeechConfig.Builder setAudioEncoding(String value)
Required. Encoding of audio data. Supported formats: - `linear16` Uncompressed 16-bit signed little-endian samples (Linear PCM).
string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];value - The audioEncoding to set.public TranslateSpeechConfig.Builder clearAudioEncoding()
Required. Encoding of audio data. Supported formats: - `linear16` Uncompressed 16-bit signed little-endian samples (Linear PCM).
string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];public TranslateSpeechConfig.Builder setAudioEncodingBytes(com.google.protobuf.ByteString value)
Required. Encoding of audio data. Supported formats: - `linear16` Uncompressed 16-bit signed little-endian samples (Linear PCM).
string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];value - The bytes for audioEncoding to set.public String getSourceLanguageCode()
Required. Source language code (BCP-47) of the input audio.
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];getSourceLanguageCode in interface TranslateSpeechConfigOrBuilderpublic com.google.protobuf.ByteString getSourceLanguageCodeBytes()
Required. Source language code (BCP-47) of the input audio.
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];getSourceLanguageCodeBytes in interface TranslateSpeechConfigOrBuilderpublic TranslateSpeechConfig.Builder setSourceLanguageCode(String value)
Required. Source language code (BCP-47) of the input audio.
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];value - The sourceLanguageCode to set.public TranslateSpeechConfig.Builder clearSourceLanguageCode()
Required. Source language code (BCP-47) of the input audio.
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];public TranslateSpeechConfig.Builder setSourceLanguageCodeBytes(com.google.protobuf.ByteString value)
Required. Source language code (BCP-47) of the input audio.
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];value - The bytes for sourceLanguageCode to set.public com.google.protobuf.ProtocolStringList getAlternativeSourceLanguageCodesList()
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.
repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
getAlternativeSourceLanguageCodesList in interface TranslateSpeechConfigOrBuilderpublic int getAlternativeSourceLanguageCodesCount()
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.
repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
getAlternativeSourceLanguageCodesCount in interface TranslateSpeechConfigOrBuilderpublic String getAlternativeSourceLanguageCodes(int index)
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.
repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
getAlternativeSourceLanguageCodes in interface TranslateSpeechConfigOrBuilderindex - The index of the element to return.public com.google.protobuf.ByteString getAlternativeSourceLanguageCodesBytes(int index)
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.
repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
getAlternativeSourceLanguageCodesBytes in interface TranslateSpeechConfigOrBuilderindex - The index of the value to return.public TranslateSpeechConfig.Builder setAlternativeSourceLanguageCodes(int index, String value)
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.
repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
index - The index to set the value at.value - The alternativeSourceLanguageCodes to set.public TranslateSpeechConfig.Builder addAlternativeSourceLanguageCodes(String value)
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.
repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
value - The alternativeSourceLanguageCodes to add.public TranslateSpeechConfig.Builder addAllAlternativeSourceLanguageCodes(Iterable<String> values)
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.
repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
values - The alternativeSourceLanguageCodes to add.public TranslateSpeechConfig.Builder clearAlternativeSourceLanguageCodes()
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.
repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
public TranslateSpeechConfig.Builder addAlternativeSourceLanguageCodesBytes(com.google.protobuf.ByteString value)
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.
repeated string alternative_source_language_codes = 6 [(.google.api.field_behavior) = OPTIONAL];
value - The bytes of the alternativeSourceLanguageCodes to add.public String getTargetLanguageCode()
Required. Target language code (BCP-47) of the output.
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];getTargetLanguageCode in interface TranslateSpeechConfigOrBuilderpublic com.google.protobuf.ByteString getTargetLanguageCodeBytes()
Required. Target language code (BCP-47) of the output.
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];getTargetLanguageCodeBytes in interface TranslateSpeechConfigOrBuilderpublic TranslateSpeechConfig.Builder setTargetLanguageCode(String value)
Required. Target language code (BCP-47) of the output.
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];value - The targetLanguageCode to set.public TranslateSpeechConfig.Builder clearTargetLanguageCode()
Required. Target language code (BCP-47) of the output.
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];public TranslateSpeechConfig.Builder setTargetLanguageCodeBytes(com.google.protobuf.ByteString value)
Required. Target language code (BCP-47) of the output.
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];value - The bytes for targetLanguageCode to set.public int getSampleRateHertz()
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.
int32 sample_rate_hertz = 4 [(.google.api.field_behavior) = OPTIONAL];getSampleRateHertz in interface TranslateSpeechConfigOrBuilderpublic TranslateSpeechConfig.Builder setSampleRateHertz(int value)
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.
int32 sample_rate_hertz = 4 [(.google.api.field_behavior) = OPTIONAL];value - The sampleRateHertz to set.public TranslateSpeechConfig.Builder clearSampleRateHertz()
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.
int32 sample_rate_hertz = 4 [(.google.api.field_behavior) = OPTIONAL];public String getModel()
Optional.
string model = 5 [(.google.api.field_behavior) = OPTIONAL];getModel in interface TranslateSpeechConfigOrBuilderpublic com.google.protobuf.ByteString getModelBytes()
Optional.
string model = 5 [(.google.api.field_behavior) = OPTIONAL];getModelBytes in interface TranslateSpeechConfigOrBuilderpublic TranslateSpeechConfig.Builder setModel(String value)
Optional.
string model = 5 [(.google.api.field_behavior) = OPTIONAL];value - The model to set.public TranslateSpeechConfig.Builder clearModel()
Optional.
string model = 5 [(.google.api.field_behavior) = OPTIONAL];public TranslateSpeechConfig.Builder setModelBytes(com.google.protobuf.ByteString value)
Optional.
string model = 5 [(.google.api.field_behavior) = OPTIONAL];value - The bytes for model to set.public final TranslateSpeechConfig.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateSpeechConfig.Builder>public final TranslateSpeechConfig.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<TranslateSpeechConfig.Builder>Copyright © 2020 Google LLC. All rights reserved.