Class TranslateSpeechConfig
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite
-
- com.google.protobuf.AbstractMessage
-
- com.google.protobuf.GeneratedMessageV3
-
- com.google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig
-
- All Implemented Interfaces:
TranslateSpeechConfigOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
public final class TranslateSpeechConfig extends com.google.protobuf.GeneratedMessageV3 implements TranslateSpeechConfigOrBuilder
Provides information to the speech translation that specifies how to process the request.
Protobuf typegoogle.cloud.mediatranslation.v1beta1.TranslateSpeechConfig- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTranslateSpeechConfig.BuilderProvides information to the speech translation that specifies how to process the request.-
Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageV3
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageT,BuilderT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter
-
-
Field Summary
Fields Modifier and Type Field Description static intAUDIO_ENCODING_FIELD_NUMBERstatic intMODEL_FIELD_NUMBERstatic intSAMPLE_RATE_HERTZ_FIELD_NUMBERstatic intSOURCE_LANGUAGE_CODE_FIELD_NUMBERstatic intTARGET_LANGUAGE_CODE_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)StringgetAudioEncoding()Required.com.google.protobuf.ByteStringgetAudioEncodingBytes()Required.static TranslateSpeechConfiggetDefaultInstance()TranslateSpeechConfiggetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()StringgetModel()Optional.com.google.protobuf.ByteStringgetModelBytes()Optional.com.google.protobuf.Parser<TranslateSpeechConfig>getParserForType()intgetSampleRateHertz()Optional.intgetSerializedSize()StringgetSourceLanguageCode()Required.com.google.protobuf.ByteStringgetSourceLanguageCodeBytes()Required.StringgetTargetLanguageCode()Required.com.google.protobuf.ByteStringgetTargetLanguageCodeBytes()Required.inthashCode()protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()static TranslateSpeechConfig.BuildernewBuilder()static TranslateSpeechConfig.BuildernewBuilder(TranslateSpeechConfig prototype)TranslateSpeechConfig.BuildernewBuilderForType()protected TranslateSpeechConfig.BuildernewBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)protected ObjectnewInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)static TranslateSpeechConfigparseDelimitedFrom(InputStream input)static TranslateSpeechConfigparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static TranslateSpeechConfigparseFrom(byte[] data)static TranslateSpeechConfigparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static TranslateSpeechConfigparseFrom(com.google.protobuf.ByteString data)static TranslateSpeechConfigparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static TranslateSpeechConfigparseFrom(com.google.protobuf.CodedInputStream input)static TranslateSpeechConfigparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static TranslateSpeechConfigparseFrom(InputStream input)static TranslateSpeechConfigparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static TranslateSpeechConfigparseFrom(ByteBuffer data)static TranslateSpeechConfigparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)static com.google.protobuf.Parser<TranslateSpeechConfig>parser()TranslateSpeechConfig.BuildertoBuilder()voidwriteTo(com.google.protobuf.CodedOutputStream output)-
Methods inherited from class com.google.protobuf.GeneratedMessageV3
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTag
-
Methods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
-
-
-
Field Detail
-
AUDIO_ENCODING_FIELD_NUMBER
public static final int AUDIO_ENCODING_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SOURCE_LANGUAGE_CODE_FIELD_NUMBER
public static final int SOURCE_LANGUAGE_CODE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
TARGET_LANGUAGE_CODE_FIELD_NUMBER
public static final int TARGET_LANGUAGE_CODE_FIELD_NUMBER
- See Also:
- Constant Field Values
-
SAMPLE_RATE_HERTZ_FIELD_NUMBER
public static final int SAMPLE_RATE_HERTZ_FIELD_NUMBER
- See Also:
- Constant Field Values
-
MODEL_FIELD_NUMBER
public static final int MODEL_FIELD_NUMBER
- See Also:
- Constant Field Values
-
-
Method Detail
-
newInstance
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
- Overrides:
newInstancein classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3
-
getAudioEncoding
public String getAudioEncoding()
Required. Encoding of audio data. Supported formats: - `linear16` Uncompressed 16-bit signed little-endian samples (Linear PCM). - `flac` `flac` (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](https://wikipedia.org/wiki/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.
string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getAudioEncodingin interfaceTranslateSpeechConfigOrBuilder- Returns:
- The audioEncoding.
-
getAudioEncodingBytes
public com.google.protobuf.ByteString getAudioEncodingBytes()
Required. Encoding of audio data. Supported formats: - `linear16` Uncompressed 16-bit signed little-endian samples (Linear PCM). - `flac` `flac` (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](https://wikipedia.org/wiki/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.
string audio_encoding = 1 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getAudioEncodingBytesin interfaceTranslateSpeechConfigOrBuilder- Returns:
- The bytes for audioEncoding.
-
getSourceLanguageCode
public String getSourceLanguageCode()
Required. Source language code (BCP-47) of the input audio.
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getSourceLanguageCodein interfaceTranslateSpeechConfigOrBuilder- Returns:
- The sourceLanguageCode.
-
getSourceLanguageCodeBytes
public 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];- Specified by:
getSourceLanguageCodeBytesin interfaceTranslateSpeechConfigOrBuilder- Returns:
- The bytes for sourceLanguageCode.
-
getTargetLanguageCode
public String getTargetLanguageCode()
Required. Target language code (BCP-47) of the output.
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getTargetLanguageCodein interfaceTranslateSpeechConfigOrBuilder- Returns:
- The targetLanguageCode.
-
getTargetLanguageCodeBytes
public com.google.protobuf.ByteString getTargetLanguageCodeBytes()
Required. Target language code (BCP-47) of the output.
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];- Specified by:
getTargetLanguageCodeBytesin interfaceTranslateSpeechConfigOrBuilder- Returns:
- The bytes for targetLanguageCode.
-
getSampleRateHertz
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).
int32 sample_rate_hertz = 4 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getSampleRateHertzin interfaceTranslateSpeechConfigOrBuilder- Returns:
- The sampleRateHertz.
-
getModel
public String getModel()
Optional. `google-provided-model/video` and `google-provided-model/enhanced-phone-call` are premium models. `google-provided-model/phone-call` is not premium model.
string model = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getModelin interfaceTranslateSpeechConfigOrBuilder- Returns:
- The model.
-
getModelBytes
public com.google.protobuf.ByteString getModelBytes()
Optional. `google-provided-model/video` and `google-provided-model/enhanced-phone-call` are premium models. `google-provided-model/phone-call` is not premium model.
string model = 5 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getModelBytesin interfaceTranslateSpeechConfigOrBuilder- Returns:
- The bytes for model.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessageV3- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static TranslateSpeechConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TranslateSpeechConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TranslateSpeechConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TranslateSpeechConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TranslateSpeechConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TranslateSpeechConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
- Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static TranslateSpeechConfig parseFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static TranslateSpeechConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static TranslateSpeechConfig parseDelimitedFrom(InputStream input) throws IOException
- Throws:
IOException
-
parseDelimitedFrom
public static TranslateSpeechConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
parseFrom
public static TranslateSpeechConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
- Throws:
IOException
-
parseFrom
public static TranslateSpeechConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Throws:
IOException
-
newBuilderForType
public TranslateSpeechConfig.Builder newBuilderForType()
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
public static TranslateSpeechConfig.Builder newBuilder()
-
newBuilder
public static TranslateSpeechConfig.Builder newBuilder(TranslateSpeechConfig prototype)
-
toBuilder
public TranslateSpeechConfig.Builder toBuilder()
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected TranslateSpeechConfig.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstance
public static TranslateSpeechConfig getDefaultInstance()
-
parser
public static com.google.protobuf.Parser<TranslateSpeechConfig> parser()
-
getParserForType
public com.google.protobuf.Parser<TranslateSpeechConfig> getParserForType()
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public TranslateSpeechConfig getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
-