Send feedback
Class StreamingTranslateSpeechResult.TextTranslationResult.Builder (0.9.6)
Stay organized with collections
Save and categorize content based on your preferences.
Version 0.9.6 keyboard_arrow_down
public static final class StreamingTranslateSpeechResult . TextTranslationResult . Builder extends GeneratedMessageV3 . Builder<StreamingTranslateSpeechResult . TextTranslationResult . Builder > implements StreamingTranslateSpeechResult . TextTranslationResultOrBuilder
Text translation result.
Protobuf type
google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechResult.TextTranslationResult
Inherited Members
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
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public StreamingTranslateSpeechResult . TextTranslationResult . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
build()
public StreamingTranslateSpeechResult . TextTranslationResult build ()
Returns
buildPartial()
public StreamingTranslateSpeechResult . TextTranslationResult buildPartial ()
Returns
clear()
public StreamingTranslateSpeechResult . TextTranslationResult . Builder clear ()
Returns
Overrides
clearField(Descriptors.FieldDescriptor field)
public StreamingTranslateSpeechResult . TextTranslationResult . Builder clearField ( Descriptors . FieldDescriptor field )
Parameter
Returns
Overrides
clearIsFinal()
public StreamingTranslateSpeechResult . TextTranslationResult . Builder clearIsFinal ()
Output only. If false
, this StreamingTranslateSpeechResult
represents
an interim result that may change. If true
, this is the final time the
translation service will return this particular
StreamingTranslateSpeechResult
, the streaming translator will not
return any further hypotheses for this portion of the transcript and
corresponding audio.
bool is_final = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
clearOneof(Descriptors.OneofDescriptor oneof)
public StreamingTranslateSpeechResult . TextTranslationResult . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Parameter
Returns
Overrides
clearTranslation()
public StreamingTranslateSpeechResult . TextTranslationResult . Builder clearTranslation ()
Output only. The translated sentence.
string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
clone()
public StreamingTranslateSpeechResult . TextTranslationResult . Builder clone ()
Returns
Overrides
getDefaultInstanceForType()
public StreamingTranslateSpeechResult . TextTranslationResult getDefaultInstanceForType ()
Returns
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Returns
Overrides
getIsFinal()
public boolean getIsFinal ()
Output only. If false
, this StreamingTranslateSpeechResult
represents
an interim result that may change. If true
, this is the final time the
translation service will return this particular
StreamingTranslateSpeechResult
, the streaming translator will not
return any further hypotheses for this portion of the transcript and
corresponding audio.
bool is_final = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
getTranslation()
public String getTranslation ()
Output only. The translated sentence.
string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type Description String The translation.
getTranslationBytes()
public ByteString getTranslationBytes ()
Output only. The translated sentence.
string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns
Type Description ByteString The bytes for translation.
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Returns
Overrides
isInitialized()
public final boolean isInitialized ()
Returns
Overrides
mergeFrom(StreamingTranslateSpeechResult.TextTranslationResult other)
public StreamingTranslateSpeechResult . TextTranslationResult . Builder mergeFrom ( StreamingTranslateSpeechResult . TextTranslationResult other )
Parameter
Returns
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public StreamingTranslateSpeechResult . TextTranslationResult . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public StreamingTranslateSpeechResult . TextTranslationResult . Builder mergeFrom ( Message other )
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final StreamingTranslateSpeechResult . TextTranslationResult . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
setField(Descriptors.FieldDescriptor field, Object value)
public StreamingTranslateSpeechResult . TextTranslationResult . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
setIsFinal(boolean value)
public StreamingTranslateSpeechResult . TextTranslationResult . Builder setIsFinal ( boolean value )
Output only. If false
, this StreamingTranslateSpeechResult
represents
an interim result that may change. If true
, this is the final time the
translation service will return this particular
StreamingTranslateSpeechResult
, the streaming translator will not
return any further hypotheses for this portion of the transcript and
corresponding audio.
bool is_final = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter
Name Description value boolean
The isFinal to set.
Returns
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public StreamingTranslateSpeechResult . TextTranslationResult . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Parameters
Returns
Overrides
setTranslation(String value)
public StreamingTranslateSpeechResult . TextTranslationResult . Builder setTranslation ( String value )
Output only. The translated sentence.
string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter
Name Description value String
The translation to set.
Returns
setTranslationBytes(ByteString value)
public StreamingTranslateSpeechResult . TextTranslationResult . Builder setTranslationBytes ( ByteString value )
Output only. The translated sentence.
string translation = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter
Name Description value ByteString
The bytes for translation to set.
Returns
setUnknownFields(UnknownFieldSet unknownFields)
public final StreamingTranslateSpeechResult . TextTranslationResult . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
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."],[],[]]