- 0.59.0 (latest)
- 0.58.0
- 0.57.0
- 0.55.0
- 0.54.0
- 0.53.0
- 0.52.0
- 0.51.0
- 0.50.0
- 0.49.0
- 0.48.0
- 0.47.0
- 0.46.0
- 0.45.0
- 0.43.0
- 0.42.0
- 0.41.0
- 0.40.0
- 0.39.0
- 0.38.0
- 0.37.0
- 0.36.0
- 0.35.0
- 0.34.0
- 0.33.0
- 0.30.0
- 0.29.0
- 0.28.0
- 0.27.0
- 0.26.0
- 0.25.0
- 0.24.0
- 0.23.0
- 0.22.0
- 0.21.0
- 0.20.0
- 0.19.0
- 0.18.0
- 0.17.0
- 0.15.0
- 0.14.0
- 0.13.0
- 0.12.0
- 0.11.0
- 0.10.0
- 0.9.6
- 0.7.10
public final class TranslateSpeechConfig extends GeneratedMessageV3 implements TranslateSpeechConfigOrBuilder
Provides information to the speech translation that specifies how to process the request.
Protobuf type google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig
Inheritance
Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > TranslateSpeechConfigImplements
TranslateSpeechConfigOrBuilderStatic Fields
AUDIO_ENCODING_FIELD_NUMBER
public static final int AUDIO_ENCODING_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
MODEL_FIELD_NUMBER
public static final int MODEL_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
SAMPLE_RATE_HERTZ_FIELD_NUMBER
public static final int SAMPLE_RATE_HERTZ_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
SOURCE_LANGUAGE_CODE_FIELD_NUMBER
public static final int SOURCE_LANGUAGE_CODE_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
TARGET_LANGUAGE_CODE_FIELD_NUMBER
public static final int TARGET_LANGUAGE_CODE_FIELD_NUMBER
Field Value | |
---|---|
Type | Description |
int |
Static Methods
getDefaultInstance()
public static TranslateSpeechConfig getDefaultInstance()
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig |
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
newBuilder()
public static TranslateSpeechConfig.Builder newBuilder()
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig.Builder |
newBuilder(TranslateSpeechConfig prototype)
public static TranslateSpeechConfig.Builder newBuilder(TranslateSpeechConfig prototype)
Parameter | |
---|---|
Name | Description |
prototype | TranslateSpeechConfig |
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig.Builder |
parseDelimitedFrom(InputStream input)
public static TranslateSpeechConfig parseDelimitedFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input | InputStream |
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig |
Exceptions | |
---|---|
Type | Description |
IOException |
parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static TranslateSpeechConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(byte[] data)
public static TranslateSpeechConfig parseFrom(byte[] data)
Parameter | |
---|---|
Name | Description |
data | byte[] |
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
public static TranslateSpeechConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data | byte[] |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data)
public static TranslateSpeechConfig parseFrom(ByteString data)
Parameter | |
---|---|
Name | Description |
data | ByteString |
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
public static TranslateSpeechConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data | ByteString |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(CodedInputStream input)
public static TranslateSpeechConfig parseFrom(CodedInputStream input)
Parameter | |
---|---|
Name | Description |
input | CodedInputStream |
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public static TranslateSpeechConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input)
public static TranslateSpeechConfig parseFrom(InputStream input)
Parameter | |
---|---|
Name | Description |
input | InputStream |
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
public static TranslateSpeechConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | InputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig |
Exceptions | |
---|---|
Type | Description |
IOException |
parseFrom(ByteBuffer data)
public static TranslateSpeechConfig parseFrom(ByteBuffer data)
Parameter | |
---|---|
Name | Description |
data | ByteBuffer |
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
public static TranslateSpeechConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
data | ByteBuffer |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig |
Exceptions | |
---|---|
Type | Description |
InvalidProtocolBufferException |
parser()
public static Parser<TranslateSpeechConfig> parser()
Returns | |
---|---|
Type | Description |
Parser<TranslateSpeechConfig> |
Methods
equals(Object obj)
public boolean equals(Object obj)
Parameter | |
---|---|
Name | Description |
obj | Object |
Returns | |
---|---|
Type | Description |
boolean |
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 oflinear16
.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 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];
Returns | |
---|---|
Type | Description |
String | The audioEncoding. |
getAudioEncodingBytes()
public 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 oflinear16
.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 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];
Returns | |
---|---|
Type | Description |
ByteString | The bytes for audioEncoding. |
getDefaultInstanceForType()
public TranslateSpeechConfig getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig |
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];
Returns | |
---|---|
Type | Description |
String | The model. |
getModelBytes()
public 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];
Returns | |
---|---|
Type | Description |
ByteString | The bytes for model. |
getParserForType()
public Parser<TranslateSpeechConfig> getParserForType()
Returns | |
---|---|
Type | Description |
Parser<TranslateSpeechConfig> |
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];
Returns | |
---|---|
Type | Description |
int | The sampleRateHertz. |
getSerializedSize()
public int getSerializedSize()
Returns | |
---|---|
Type | Description |
int |
getSourceLanguageCode()
public String getSourceLanguageCode()
Required. Source language code (BCP-47) of the input audio.
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
String | The sourceLanguageCode. |
getSourceLanguageCodeBytes()
public ByteString getSourceLanguageCodeBytes()
Required. Source language code (BCP-47) of the input audio.
string source_language_code = 2 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
ByteString | 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];
Returns | |
---|---|
Type | Description |
String | The targetLanguageCode. |
getTargetLanguageCodeBytes()
public ByteString getTargetLanguageCodeBytes()
Required. Target language code (BCP-47) of the output.
string target_language_code = 3 [(.google.api.field_behavior) = REQUIRED];
Returns | |
---|---|
Type | Description |
ByteString | The bytes for targetLanguageCode. |
getUnknownFields()
public final UnknownFieldSet getUnknownFields()
Returns | |
---|---|
Type | Description |
UnknownFieldSet |
hashCode()
public int hashCode()
Returns | |
---|---|
Type | Description |
int |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
newBuilderForType()
public TranslateSpeechConfig.Builder newBuilderForType()
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig.Builder |
newBuilderForType(GeneratedMessageV3.BuilderParent parent)
protected TranslateSpeechConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter | |
---|---|
Name | Description |
parent | BuilderParent |
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig.Builder |
newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter | |
---|---|
Name | Description |
unused | UnusedPrivateParameter |
Returns | |
---|---|
Type | Description |
Object |
toBuilder()
public TranslateSpeechConfig.Builder toBuilder()
Returns | |
---|---|
Type | Description |
TranslateSpeechConfig.Builder |
writeTo(CodedOutputStream output)
public void writeTo(CodedOutputStream output)
Parameter | |
---|---|
Name | Description |
output | CodedOutputStream |
Exceptions | |
---|---|
Type | Description |
IOException |