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 class
TranslateSpeechConfig.Builder
Provides 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 int
AUDIO_ENCODING_FIELD_NUMBER
static int
MODEL_FIELD_NUMBER
static int
SAMPLE_RATE_HERTZ_FIELD_NUMBER
static int
SOURCE_LANGUAGE_CODE_FIELD_NUMBER
static int
TARGET_LANGUAGE_CODE_FIELD_NUMBER
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
String
getAudioEncoding()
Required.com.google.protobuf.ByteString
getAudioEncodingBytes()
Required.static TranslateSpeechConfig
getDefaultInstance()
TranslateSpeechConfig
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
String
getModel()
Optional.com.google.protobuf.ByteString
getModelBytes()
Optional.com.google.protobuf.Parser<TranslateSpeechConfig>
getParserForType()
int
getSampleRateHertz()
Optional.int
getSerializedSize()
String
getSourceLanguageCode()
Required.com.google.protobuf.ByteString
getSourceLanguageCodeBytes()
Required.String
getTargetLanguageCode()
Required.com.google.protobuf.ByteString
getTargetLanguageCodeBytes()
Required.int
hashCode()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
static TranslateSpeechConfig.Builder
newBuilder()
static TranslateSpeechConfig.Builder
newBuilder(TranslateSpeechConfig prototype)
TranslateSpeechConfig.Builder
newBuilderForType()
protected TranslateSpeechConfig.Builder
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
protected Object
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
static TranslateSpeechConfig
parseDelimitedFrom(InputStream input)
static TranslateSpeechConfig
parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TranslateSpeechConfig
parseFrom(byte[] data)
static TranslateSpeechConfig
parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TranslateSpeechConfig
parseFrom(com.google.protobuf.ByteString data)
static TranslateSpeechConfig
parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TranslateSpeechConfig
parseFrom(com.google.protobuf.CodedInputStream input)
static TranslateSpeechConfig
parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TranslateSpeechConfig
parseFrom(InputStream input)
static TranslateSpeechConfig
parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static TranslateSpeechConfig
parseFrom(ByteBuffer data)
static TranslateSpeechConfig
parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.protobuf.Parser<TranslateSpeechConfig>
parser()
TranslateSpeechConfig.Builder
toBuilder()
void
writeTo(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:
newInstance
in classcom.google.protobuf.GeneratedMessageV3
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in 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:
getAudioEncoding
in 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:
getAudioEncodingBytes
in 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:
getSourceLanguageCode
in 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:
getSourceLanguageCodeBytes
in 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:
getTargetLanguageCode
in 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:
getTargetLanguageCodeBytes
in 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:
getSampleRateHertz
in 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:
getModel
in 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:
getModelBytes
in interfaceTranslateSpeechConfigOrBuilder
- Returns:
- The bytes for model.
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3
-
writeTo
public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
- Specified by:
writeTo
in interfacecom.google.protobuf.MessageLite
- Overrides:
writeTo
in classcom.google.protobuf.GeneratedMessageV3
- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()
- Specified by:
getSerializedSize
in interfacecom.google.protobuf.MessageLite
- Overrides:
getSerializedSize
in classcom.google.protobuf.GeneratedMessageV3
-
equals
public boolean equals(Object obj)
- Specified by:
equals
in interfacecom.google.protobuf.Message
- Overrides:
equals
in classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()
- Specified by:
hashCode
in interfacecom.google.protobuf.Message
- Overrides:
hashCode
in 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:
newBuilderForType
in interfacecom.google.protobuf.Message
- Specified by:
newBuilderForType
in 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:
toBuilder
in interfacecom.google.protobuf.Message
- Specified by:
toBuilder
in interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected TranslateSpeechConfig.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
- Specified by:
newBuilderForType
in 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:
getParserForType
in interfacecom.google.protobuf.Message
- Specified by:
getParserForType
in interfacecom.google.protobuf.MessageLite
- Overrides:
getParserForType
in classcom.google.protobuf.GeneratedMessageV3
-
getDefaultInstanceForType
public TranslateSpeechConfig getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
-