Send feedback
Class StreamingTranslateSpeechConfig (0.27.0)
Stay organized with collections
Save and categorize content based on your preferences.
Version 0.27.0 keyboard_arrow_down
public final class StreamingTranslateSpeechConfig extends GeneratedMessageV3 implements StreamingTranslateSpeechConfigOrBuilder
Config used for streaming translation.
Protobuf type google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig
Inherited Members
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
Static Fields
public static final int AUDIO_CONFIG_FIELD_NUMBER
Field Value Type Description int
public static final int SINGLE_UTTERANCE_FIELD_NUMBER
Field Value Type Description int
Static Methods
public static StreamingTranslateSpeechConfig getDefaultInstance ()
public static final Descriptors . Descriptor getDescriptor ()
public static StreamingTranslateSpeechConfig . Builder newBuilder ()
public static StreamingTranslateSpeechConfig . Builder newBuilder ( StreamingTranslateSpeechConfig prototype )
public static StreamingTranslateSpeechConfig parseDelimitedFrom ( InputStream input )
public static StreamingTranslateSpeechConfig parseDelimitedFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
public static StreamingTranslateSpeechConfig parseFrom ( byte [] data )
Parameter Name Description data
byte []
public static StreamingTranslateSpeechConfig parseFrom ( byte [] data , ExtensionRegistryLite extensionRegistry )
public static StreamingTranslateSpeechConfig parseFrom ( ByteString data )
public static StreamingTranslateSpeechConfig parseFrom ( ByteString data , ExtensionRegistryLite extensionRegistry )
public static StreamingTranslateSpeechConfig parseFrom ( CodedInputStream input )
public static StreamingTranslateSpeechConfig parseFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
public static StreamingTranslateSpeechConfig parseFrom ( InputStream input )
public static StreamingTranslateSpeechConfig parseFrom ( InputStream input , ExtensionRegistryLite extensionRegistry )
public static StreamingTranslateSpeechConfig parseFrom ( ByteBuffer data )
public static StreamingTranslateSpeechConfig parseFrom ( ByteBuffer data , ExtensionRegistryLite extensionRegistry )
public static Parser<StreamingTranslateSpeechConfig> parser ()
Methods
public boolean equals ( Object obj )
Parameter Name Description obj
Object
Overrides
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];
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];
public StreamingTranslateSpeechConfig getDefaultInstanceForType ()
public Parser<StreamingTranslateSpeechConfig> getParserForType ()
Overrides
public int getSerializedSize ()
Returns Type Description int
Overrides
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
StreamingTranslateSpeechResult
s 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 Type Description boolean
The singleUtterance.
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 Type Description boolean
Whether the audioConfig field is set.
Returns Type Description int
Overrides
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Overrides
public final boolean isInitialized ()
Overrides
public StreamingTranslateSpeechConfig . Builder newBuilderForType ()
protected StreamingTranslateSpeechConfig . Builder newBuilderForType ( GeneratedMessageV3 . BuilderParent parent )
Overrides
protected Object newInstance ( GeneratedMessageV3 . UnusedPrivateParameter unused )
Overrides
public StreamingTranslateSpeechConfig . Builder toBuilder ()
public void writeTo ( CodedOutputStream output )
Overrides
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-01-27 UTC.
Need to tell us more?
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-27 UTC."],[],[]]