- 4.48.0 (latest)
- 4.47.0
- 4.46.0
- 4.44.0
- 4.43.0
- 4.42.0
- 4.41.0
- 4.40.0
- 4.39.0
- 4.38.0
- 4.37.0
- 4.36.0
- 4.35.0
- 4.34.0
- 4.32.0
- 4.31.0
- 4.30.0
- 4.29.0
- 4.28.0
- 4.27.0
- 4.26.0
- 4.25.0
- 4.24.0
- 4.23.0
- 4.22.0
- 4.19.0
- 4.18.0
- 4.17.0
- 4.16.0
- 4.15.0
- 4.14.0
- 4.13.0
- 4.12.0
- 4.11.0
- 4.10.0
- 4.9.0
- 4.8.0
- 4.7.0
- 4.6.0
- 4.4.0
- 4.3.0
- 4.2.0
- 4.1.0
- 4.0.0
- 3.0.0
- 2.6.1
- 2.5.9
- 2.4.0
- 2.3.0
- 2.2.15
public static final class StreamingRecognizeResponse.Builder extends GeneratedMessageV3.Builder<StreamingRecognizeResponse.Builder> implements StreamingRecognizeResponseOrBuilder
StreamingRecognizeResponse
is the only message returned to the client by
StreamingRecognize
. A series of zero or more StreamingRecognizeResponse
messages are streamed back to the client. If there is no recognizable
audio, and single_utterance
is set to false, then no messages are streamed
back to the client.
Here's an example of a series of StreamingRecognizeResponse
s that might be
returned while processing audio:
- results { alternatives { transcript: "tube" } stability: 0.01 }
- results { alternatives { transcript: "to be a" } stability: 0.01 }
- results { alternatives { transcript: "to be" } stability: 0.9 } results { alternatives { transcript: " or not to be" } stability: 0.01 }
- results { alternatives { transcript: "to be or not to be" confidence: 0.92 } alternatives { transcript: "to bee or not to bee" } is_final: true }
- results { alternatives { transcript: " that's" } stability: 0.01 }
- results { alternatives { transcript: " that is" } stability: 0.9 } results { alternatives { transcript: " the question" } stability: 0.01 }
- results { alternatives { transcript: " that is the question" confidence: 0.98 } alternatives { transcript: " that was the question" } is_final: true } Notes:
- Only two of the above responses #4 and #7 contain final results; they are
indicated by
is_final: true
. Concatenating these together generates the full transcript: "to be or not to be that is the question". - The others contain interim
results
. #3 and #6 contain two interimresults
: the first portion has a high stability and is less likely to change; the second portion has a low stability and is very likely to change. A UI designer might choose to show only high stabilityresults
. - The specific
stability
andconfidence
values shown above are only for illustrative purposes. Actual values may vary. - In each response, only one of these fields will be set:
error
,speech_event_type
, or one or more (repeated)results
.
Protobuf type google.cloud.speech.v1.StreamingRecognizeResponse
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > StreamingRecognizeResponse.BuilderImplements
StreamingRecognizeResponseOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Returns | |
---|---|
Type | Description |
Descriptor |
Methods
addAllResults(Iterable<? extends StreamingRecognitionResult> values)
public StreamingRecognizeResponse.Builder addAllResults(Iterable<? extends StreamingRecognitionResult> values)
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Parameter | |
---|---|
Name | Description |
values | Iterable<? extends com.google.cloud.speech.v1.StreamingRecognitionResult> |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public StreamingRecognizeResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
addResults(StreamingRecognitionResult value)
public StreamingRecognizeResponse.Builder addResults(StreamingRecognitionResult value)
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Parameter | |
---|---|
Name | Description |
value | StreamingRecognitionResult |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
addResults(StreamingRecognitionResult.Builder builderForValue)
public StreamingRecognizeResponse.Builder addResults(StreamingRecognitionResult.Builder builderForValue)
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Parameter | |
---|---|
Name | Description |
builderForValue | StreamingRecognitionResult.Builder |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
addResults(int index, StreamingRecognitionResult value)
public StreamingRecognizeResponse.Builder addResults(int index, StreamingRecognitionResult value)
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Parameters | |
---|---|
Name | Description |
index | int |
value | StreamingRecognitionResult |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
addResults(int index, StreamingRecognitionResult.Builder builderForValue)
public StreamingRecognizeResponse.Builder addResults(int index, StreamingRecognitionResult.Builder builderForValue)
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Parameters | |
---|---|
Name | Description |
index | int |
builderForValue | StreamingRecognitionResult.Builder |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
addResultsBuilder()
public StreamingRecognitionResult.Builder addResultsBuilder()
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Returns | |
---|---|
Type | Description |
StreamingRecognitionResult.Builder |
addResultsBuilder(int index)
public StreamingRecognitionResult.Builder addResultsBuilder(int index)
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
StreamingRecognitionResult.Builder |
build()
public StreamingRecognizeResponse build()
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse |
buildPartial()
public StreamingRecognizeResponse buildPartial()
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse |
clear()
public StreamingRecognizeResponse.Builder clear()
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
clearError()
public StreamingRecognizeResponse.Builder clearError()
If set, returns a google.rpc.Status message that specifies the error for the operation.
.google.rpc.Status error = 1;
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
clearField(Descriptors.FieldDescriptor field)
public StreamingRecognizeResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter | |
---|---|
Name | Description |
field | FieldDescriptor |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public StreamingRecognizeResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter | |
---|---|
Name | Description |
oneof | OneofDescriptor |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
clearRequestId()
public StreamingRecognizeResponse.Builder clearRequestId()
The ID associated with the request. This is a unique ID specific only to the given request.
int64 request_id = 10;
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder | This builder for chaining. |
clearResults()
public StreamingRecognizeResponse.Builder clearResults()
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
clearSpeechAdaptationInfo()
public StreamingRecognizeResponse.Builder clearSpeechAdaptationInfo()
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 9;
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
clearSpeechEventTime()
public StreamingRecognizeResponse.Builder clearSpeechEventTime()
Time offset between the beginning of the audio and event emission.
.google.protobuf.Duration speech_event_time = 8;
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
clearSpeechEventType()
public StreamingRecognizeResponse.Builder clearSpeechEventType()
Indicates the type of speech event.
.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType speech_event_type = 4;
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder | This builder for chaining. |
clearTotalBilledTime()
public StreamingRecognizeResponse.Builder clearTotalBilledTime()
When available, billed audio seconds for the stream. Set only if this is the last response in the stream.
.google.protobuf.Duration total_billed_time = 5;
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
clone()
public StreamingRecognizeResponse.Builder clone()
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
getDefaultInstanceForType()
public StreamingRecognizeResponse getDefaultInstanceForType()
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Returns | |
---|---|
Type | Description |
Descriptor |
getError()
public Status getError()
If set, returns a google.rpc.Status message that specifies the error for the operation.
.google.rpc.Status error = 1;
Returns | |
---|---|
Type | Description |
com.google.rpc.Status | The error. |
getErrorBuilder()
public Status.Builder getErrorBuilder()
If set, returns a google.rpc.Status message that specifies the error for the operation.
.google.rpc.Status error = 1;
Returns | |
---|---|
Type | Description |
com.google.rpc.Status.Builder |
getErrorOrBuilder()
public StatusOrBuilder getErrorOrBuilder()
If set, returns a google.rpc.Status message that specifies the error for the operation.
.google.rpc.Status error = 1;
Returns | |
---|---|
Type | Description |
com.google.rpc.StatusOrBuilder |
getRequestId()
public long getRequestId()
The ID associated with the request. This is a unique ID specific only to the given request.
int64 request_id = 10;
Returns | |
---|---|
Type | Description |
long | The requestId. |
getResults(int index)
public StreamingRecognitionResult getResults(int index)
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
StreamingRecognitionResult |
getResultsBuilder(int index)
public StreamingRecognitionResult.Builder getResultsBuilder(int index)
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
StreamingRecognitionResult.Builder |
getResultsBuilderList()
public List<StreamingRecognitionResult.Builder> getResultsBuilderList()
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Returns | |
---|---|
Type | Description |
List<Builder> |
getResultsCount()
public int getResultsCount()
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Returns | |
---|---|
Type | Description |
int |
getResultsList()
public List<StreamingRecognitionResult> getResultsList()
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Returns | |
---|---|
Type | Description |
List<StreamingRecognitionResult> |
getResultsOrBuilder(int index)
public StreamingRecognitionResultOrBuilder getResultsOrBuilder(int index)
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
StreamingRecognitionResultOrBuilder |
getResultsOrBuilderList()
public List<? extends StreamingRecognitionResultOrBuilder> getResultsOrBuilderList()
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Returns | |
---|---|
Type | Description |
List<? extends com.google.cloud.speech.v1.StreamingRecognitionResultOrBuilder> |
getSpeechAdaptationInfo()
public SpeechAdaptationInfo getSpeechAdaptationInfo()
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 9;
Returns | |
---|---|
Type | Description |
SpeechAdaptationInfo | The speechAdaptationInfo. |
getSpeechAdaptationInfoBuilder()
public SpeechAdaptationInfo.Builder getSpeechAdaptationInfoBuilder()
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 9;
Returns | |
---|---|
Type | Description |
SpeechAdaptationInfo.Builder |
getSpeechAdaptationInfoOrBuilder()
public SpeechAdaptationInfoOrBuilder getSpeechAdaptationInfoOrBuilder()
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 9;
Returns | |
---|---|
Type | Description |
SpeechAdaptationInfoOrBuilder |
getSpeechEventTime()
public Duration getSpeechEventTime()
Time offset between the beginning of the audio and event emission.
.google.protobuf.Duration speech_event_time = 8;
Returns | |
---|---|
Type | Description |
Duration | The speechEventTime. |
getSpeechEventTimeBuilder()
public Duration.Builder getSpeechEventTimeBuilder()
Time offset between the beginning of the audio and event emission.
.google.protobuf.Duration speech_event_time = 8;
Returns | |
---|---|
Type | Description |
Builder |
getSpeechEventTimeOrBuilder()
public DurationOrBuilder getSpeechEventTimeOrBuilder()
Time offset between the beginning of the audio and event emission.
.google.protobuf.Duration speech_event_time = 8;
Returns | |
---|---|
Type | Description |
DurationOrBuilder |
getSpeechEventType()
public StreamingRecognizeResponse.SpeechEventType getSpeechEventType()
Indicates the type of speech event.
.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType speech_event_type = 4;
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.SpeechEventType | The speechEventType. |
getSpeechEventTypeValue()
public int getSpeechEventTypeValue()
Indicates the type of speech event.
.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType speech_event_type = 4;
Returns | |
---|---|
Type | Description |
int | The enum numeric value on the wire for speechEventType. |
getTotalBilledTime()
public Duration getTotalBilledTime()
When available, billed audio seconds for the stream. Set only if this is the last response in the stream.
.google.protobuf.Duration total_billed_time = 5;
Returns | |
---|---|
Type | Description |
Duration | The totalBilledTime. |
getTotalBilledTimeBuilder()
public Duration.Builder getTotalBilledTimeBuilder()
When available, billed audio seconds for the stream. Set only if this is the last response in the stream.
.google.protobuf.Duration total_billed_time = 5;
Returns | |
---|---|
Type | Description |
Builder |
getTotalBilledTimeOrBuilder()
public DurationOrBuilder getTotalBilledTimeOrBuilder()
When available, billed audio seconds for the stream. Set only if this is the last response in the stream.
.google.protobuf.Duration total_billed_time = 5;
Returns | |
---|---|
Type | Description |
DurationOrBuilder |
hasError()
public boolean hasError()
If set, returns a google.rpc.Status message that specifies the error for the operation.
.google.rpc.Status error = 1;
Returns | |
---|---|
Type | Description |
boolean | Whether the error field is set. |
hasSpeechAdaptationInfo()
public boolean hasSpeechAdaptationInfo()
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 9;
Returns | |
---|---|
Type | Description |
boolean | Whether the speechAdaptationInfo field is set. |
hasSpeechEventTime()
public boolean hasSpeechEventTime()
Time offset between the beginning of the audio and event emission.
.google.protobuf.Duration speech_event_time = 8;
Returns | |
---|---|
Type | Description |
boolean | Whether the speechEventTime field is set. |
hasTotalBilledTime()
public boolean hasTotalBilledTime()
When available, billed audio seconds for the stream. Set only if this is the last response in the stream.
.google.protobuf.Duration total_billed_time = 5;
Returns | |
---|---|
Type | Description |
boolean | Whether the totalBilledTime field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns | |
---|---|
Type | Description |
FieldAccessorTable |
isInitialized()
public final boolean isInitialized()
Returns | |
---|---|
Type | Description |
boolean |
mergeError(Status value)
public StreamingRecognizeResponse.Builder mergeError(Status value)
If set, returns a google.rpc.Status message that specifies the error for the operation.
.google.rpc.Status error = 1;
Parameter | |
---|---|
Name | Description |
value | com.google.rpc.Status |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
mergeFrom(StreamingRecognizeResponse other)
public StreamingRecognizeResponse.Builder mergeFrom(StreamingRecognizeResponse other)
Parameter | |
---|---|
Name | Description |
other | StreamingRecognizeResponse |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public StreamingRecognizeResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters | |
---|---|
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
Exceptions | |
---|---|
Type | Description |
IOException |
mergeFrom(Message other)
public StreamingRecognizeResponse.Builder mergeFrom(Message other)
Parameter | |
---|---|
Name | Description |
other | Message |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
mergeSpeechAdaptationInfo(SpeechAdaptationInfo value)
public StreamingRecognizeResponse.Builder mergeSpeechAdaptationInfo(SpeechAdaptationInfo value)
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 9;
Parameter | |
---|---|
Name | Description |
value | SpeechAdaptationInfo |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
mergeSpeechEventTime(Duration value)
public StreamingRecognizeResponse.Builder mergeSpeechEventTime(Duration value)
Time offset between the beginning of the audio and event emission.
.google.protobuf.Duration speech_event_time = 8;
Parameter | |
---|---|
Name | Description |
value | Duration |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
mergeTotalBilledTime(Duration value)
public StreamingRecognizeResponse.Builder mergeTotalBilledTime(Duration value)
When available, billed audio seconds for the stream. Set only if this is the last response in the stream.
.google.protobuf.Duration total_billed_time = 5;
Parameter | |
---|---|
Name | Description |
value | Duration |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final StreamingRecognizeResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
removeResults(int index)
public StreamingRecognizeResponse.Builder removeResults(int index)
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Parameter | |
---|---|
Name | Description |
index | int |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
setError(Status value)
public StreamingRecognizeResponse.Builder setError(Status value)
If set, returns a google.rpc.Status message that specifies the error for the operation.
.google.rpc.Status error = 1;
Parameter | |
---|---|
Name | Description |
value | com.google.rpc.Status |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
setError(Status.Builder builderForValue)
public StreamingRecognizeResponse.Builder setError(Status.Builder builderForValue)
If set, returns a google.rpc.Status message that specifies the error for the operation.
.google.rpc.Status error = 1;
Parameter | |
---|---|
Name | Description |
builderForValue | com.google.rpc.Status.Builder |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public StreamingRecognizeResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
value | Object |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public StreamingRecognizeResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters | |
---|---|
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
setRequestId(long value)
public StreamingRecognizeResponse.Builder setRequestId(long value)
The ID associated with the request. This is a unique ID specific only to the given request.
int64 request_id = 10;
Parameter | |
---|---|
Name | Description |
value | long The requestId to set. |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder | This builder for chaining. |
setResults(int index, StreamingRecognitionResult value)
public StreamingRecognizeResponse.Builder setResults(int index, StreamingRecognitionResult value)
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Parameters | |
---|---|
Name | Description |
index | int |
value | StreamingRecognitionResult |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
setResults(int index, StreamingRecognitionResult.Builder builderForValue)
public StreamingRecognizeResponse.Builder setResults(int index, StreamingRecognitionResult.Builder builderForValue)
This repeated list contains zero or more results that
correspond to consecutive portions of the audio currently being processed.
It contains zero or one is_final=true
result (the newly settled portion),
followed by zero or more is_final=false
results (the interim results).
repeated .google.cloud.speech.v1.StreamingRecognitionResult results = 2;
Parameters | |
---|---|
Name | Description |
index | int |
builderForValue | StreamingRecognitionResult.Builder |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
setSpeechAdaptationInfo(SpeechAdaptationInfo value)
public StreamingRecognizeResponse.Builder setSpeechAdaptationInfo(SpeechAdaptationInfo value)
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 9;
Parameter | |
---|---|
Name | Description |
value | SpeechAdaptationInfo |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
setSpeechAdaptationInfo(SpeechAdaptationInfo.Builder builderForValue)
public StreamingRecognizeResponse.Builder setSpeechAdaptationInfo(SpeechAdaptationInfo.Builder builderForValue)
Provides information on adaptation behavior in response
.google.cloud.speech.v1.SpeechAdaptationInfo speech_adaptation_info = 9;
Parameter | |
---|---|
Name | Description |
builderForValue | SpeechAdaptationInfo.Builder |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
setSpeechEventTime(Duration value)
public StreamingRecognizeResponse.Builder setSpeechEventTime(Duration value)
Time offset between the beginning of the audio and event emission.
.google.protobuf.Duration speech_event_time = 8;
Parameter | |
---|---|
Name | Description |
value | Duration |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
setSpeechEventTime(Duration.Builder builderForValue)
public StreamingRecognizeResponse.Builder setSpeechEventTime(Duration.Builder builderForValue)
Time offset between the beginning of the audio and event emission.
.google.protobuf.Duration speech_event_time = 8;
Parameter | |
---|---|
Name | Description |
builderForValue | Builder |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
setSpeechEventType(StreamingRecognizeResponse.SpeechEventType value)
public StreamingRecognizeResponse.Builder setSpeechEventType(StreamingRecognizeResponse.SpeechEventType value)
Indicates the type of speech event.
.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType speech_event_type = 4;
Parameter | |
---|---|
Name | Description |
value | StreamingRecognizeResponse.SpeechEventType The speechEventType to set. |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder | This builder for chaining. |
setSpeechEventTypeValue(int value)
public StreamingRecognizeResponse.Builder setSpeechEventTypeValue(int value)
Indicates the type of speech event.
.google.cloud.speech.v1.StreamingRecognizeResponse.SpeechEventType speech_event_type = 4;
Parameter | |
---|---|
Name | Description |
value | int The enum numeric value on the wire for speechEventType to set. |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder | This builder for chaining. |
setTotalBilledTime(Duration value)
public StreamingRecognizeResponse.Builder setTotalBilledTime(Duration value)
When available, billed audio seconds for the stream. Set only if this is the last response in the stream.
.google.protobuf.Duration total_billed_time = 5;
Parameter | |
---|---|
Name | Description |
value | Duration |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
setTotalBilledTime(Duration.Builder builderForValue)
public StreamingRecognizeResponse.Builder setTotalBilledTime(Duration.Builder builderForValue)
When available, billed audio seconds for the stream. Set only if this is the last response in the stream.
.google.protobuf.Duration total_billed_time = 5;
Parameter | |
---|---|
Name | Description |
builderForValue | Builder |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final StreamingRecognizeResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter | |
---|---|
Name | Description |
unknownFields | UnknownFieldSet |
Returns | |
---|---|
Type | Description |
StreamingRecognizeResponse.Builder |