Class StreamingTranslateSpeechConfig.Builder (0.13.0)

public static final class StreamingTranslateSpeechConfig.Builder extends GeneratedMessageV3.Builder<StreamingTranslateSpeechConfig.Builder> implements StreamingTranslateSpeechConfigOrBuilder

Config used for streaming translation.

Protobuf type google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig

com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public StreamingTranslateSpeechConfig.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns Overrides

build()

public StreamingTranslateSpeechConfig build()
Returns

buildPartial()

public StreamingTranslateSpeechConfig buildPartial()
Returns

clear()

public StreamingTranslateSpeechConfig.Builder clear()
Returns Overrides

clearAudioConfig()

public StreamingTranslateSpeechConfig.Builder clearAudioConfig()

Required. The common config for all the following audio contents.

.google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];

Returns

clearField(Descriptors.FieldDescriptor field)

public StreamingTranslateSpeechConfig.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns Overrides

clearOneof(Descriptors.OneofDescriptor oneof)

public StreamingTranslateSpeechConfig.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns Overrides

clearSingleUtterance()

public StreamingTranslateSpeechConfig.Builder clearSingleUtterance()

Optional. If false or omitted, the system performs continuous translation (continuing to wait for and process audio even if the user pauses speaking) until the client closes the input stream (gRPC API) or until the maximum time limit has been reached. May return multiple StreamingTranslateSpeechResults with the is_final flag set to true. If true, the speech translator will detect a single spoken utterance. When it detects that the user has paused or stopped speaking, it will return an END_OF_SINGLE_UTTERANCE event and cease translation. When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should stop sending the requests. However, clients should keep receiving remaining responses until the stream is terminated. To construct the complete sentence in a streaming way, one should override (if 'is_final' of previous response is false), or append (if 'is_final' of previous response is true).

bool single_utterance = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
StreamingTranslateSpeechConfig.Builder

This builder for chaining.

clone()

public StreamingTranslateSpeechConfig.Builder clone()
Returns Overrides

getAudioConfig()

public TranslateSpeechConfig getAudioConfig()

Required. The common config for all the following audio contents.

.google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
TranslateSpeechConfig

The audioConfig.

getAudioConfigBuilder()

public TranslateSpeechConfig.Builder getAudioConfigBuilder()

Required. The common config for all the following audio contents.

.google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];

Returns

getAudioConfigOrBuilder()

public TranslateSpeechConfigOrBuilder getAudioConfigOrBuilder()

Required. The common config for all the following audio contents.

.google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];

Returns

getDefaultInstanceForType()

public StreamingTranslateSpeechConfig getDefaultInstanceForType()
Returns

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getSingleUtterance()

public boolean getSingleUtterance()

Optional. If false or omitted, the system performs continuous translation (continuing to wait for and process audio even if the user pauses speaking) until the client closes the input stream (gRPC API) or until the maximum time limit has been reached. May return multiple StreamingTranslateSpeechResults with the is_final flag set to true. If true, the speech translator will detect a single spoken utterance. When it detects that the user has paused or stopped speaking, it will return an END_OF_SINGLE_UTTERANCE event and cease translation. When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should stop sending the requests. However, clients should keep receiving remaining responses until the stream is terminated. To construct the complete sentence in a streaming way, one should override (if 'is_final' of previous response is false), or append (if 'is_final' of previous response is true).

bool single_utterance = 2 [(.google.api.field_behavior) = OPTIONAL];

Returns
TypeDescription
boolean

The singleUtterance.

hasAudioConfig()

public boolean hasAudioConfig()

Required. The common config for all the following audio contents.

.google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
TypeDescription
boolean

Whether the audioConfig field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeAudioConfig(TranslateSpeechConfig value)

public StreamingTranslateSpeechConfig.Builder mergeAudioConfig(TranslateSpeechConfig value)

Required. The common config for all the following audio contents.

.google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueTranslateSpeechConfig
Returns

mergeFrom(StreamingTranslateSpeechConfig other)

public StreamingTranslateSpeechConfig.Builder mergeFrom(StreamingTranslateSpeechConfig other)
Parameter
NameDescription
otherStreamingTranslateSpeechConfig
Returns

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public StreamingTranslateSpeechConfig.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public StreamingTranslateSpeechConfig.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final StreamingTranslateSpeechConfig.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns Overrides

setAudioConfig(TranslateSpeechConfig value)

public StreamingTranslateSpeechConfig.Builder setAudioConfig(TranslateSpeechConfig value)

Required. The common config for all the following audio contents.

.google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
valueTranslateSpeechConfig
Returns

setAudioConfig(TranslateSpeechConfig.Builder builderForValue)

public StreamingTranslateSpeechConfig.Builder setAudioConfig(TranslateSpeechConfig.Builder builderForValue)

Required. The common config for all the following audio contents.

.google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig audio_config = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
NameDescription
builderForValueTranslateSpeechConfig.Builder
Returns

setField(Descriptors.FieldDescriptor field, Object value)

public StreamingTranslateSpeechConfig.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns Overrides

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public StreamingTranslateSpeechConfig.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns Overrides

setSingleUtterance(boolean value)

public StreamingTranslateSpeechConfig.Builder setSingleUtterance(boolean value)

Optional. If false or omitted, the system performs continuous translation (continuing to wait for and process audio even if the user pauses speaking) until the client closes the input stream (gRPC API) or until the maximum time limit has been reached. May return multiple StreamingTranslateSpeechResults with the is_final flag set to true. If true, the speech translator will detect a single spoken utterance. When it detects that the user has paused or stopped speaking, it will return an END_OF_SINGLE_UTTERANCE event and cease translation. When the client receives 'END_OF_SINGLE_UTTERANCE' event, the client should stop sending the requests. However, clients should keep receiving remaining responses until the stream is terminated. To construct the complete sentence in a streaming way, one should override (if 'is_final' of previous response is false), or append (if 'is_final' of previous response is true).

bool single_utterance = 2 [(.google.api.field_behavior) = OPTIONAL];

Parameter
NameDescription
valueboolean

The singleUtterance to set.

Returns
TypeDescription
StreamingTranslateSpeechConfig.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final StreamingTranslateSpeechConfig.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns Overrides