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 type
google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig| Modifier and Type | Class and Description |
|---|---|
static class |
TranslateSpeechConfig.Builder
Provides information to the speech translation that specifies how to process
the request.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and 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 |
| Modifier and Type | Method and 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.
|
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
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(ByteBuffer data) |
static TranslateSpeechConfig |
parseFrom(ByteBuffer 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 com.google.protobuf.Parser<TranslateSpeechConfig> |
parser() |
TranslateSpeechConfig.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, internalGetMapField, isStringEmpty, makeExtensionsImmutable, 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, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int AUDIO_ENCODING_FIELD_NUMBER
public static final int SOURCE_LANGUAGE_CODE_FIELD_NUMBER
public static final int TARGET_LANGUAGE_CODE_FIELD_NUMBER
public static final int SAMPLE_RATE_HERTZ_FIELD_NUMBER
public static final int MODEL_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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];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). - `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];getAudioEncodingBytes in interface TranslateSpeechConfigOrBuilderpublic 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 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 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];getSampleRateHertz in interface TranslateSpeechConfigOrBuilderpublic 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];getModel in interface TranslateSpeechConfigOrBuilderpublic 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];getModelBytes in interface TranslateSpeechConfigOrBuilderpublic final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static TranslateSpeechConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TranslateSpeechConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TranslateSpeechConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TranslateSpeechConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TranslateSpeechConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TranslateSpeechConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static TranslateSpeechConfig parseFrom(InputStream input) throws IOException
IOExceptionpublic static TranslateSpeechConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static TranslateSpeechConfig parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static TranslateSpeechConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static TranslateSpeechConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static TranslateSpeechConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic TranslateSpeechConfig.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static TranslateSpeechConfig.Builder newBuilder()
public static TranslateSpeechConfig.Builder newBuilder(TranslateSpeechConfig prototype)
public TranslateSpeechConfig.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected TranslateSpeechConfig.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static TranslateSpeechConfig getDefaultInstance()
public static com.google.protobuf.Parser<TranslateSpeechConfig> parser()
public com.google.protobuf.Parser<TranslateSpeechConfig> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public TranslateSpeechConfig getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2022 Google LLC. All rights reserved.