Package com.google.cloud.speech.v2
Class RecognitionFeatures.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<RecognitionFeatures.Builder>
-
- com.google.cloud.speech.v2.RecognitionFeatures.Builder
-
- All Implemented Interfaces:
RecognitionFeaturesOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- RecognitionFeatures
public static final class RecognitionFeatures.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<RecognitionFeatures.Builder> implements RecognitionFeaturesOrBuilder
Available recognition features.
Protobuf typegoogle.cloud.speech.v2.RecognitionFeatures
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RecognitionFeatures.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
RecognitionFeatures
build()
RecognitionFeatures
buildPartial()
RecognitionFeatures.Builder
clear()
RecognitionFeatures.Builder
clearDiarizationConfig()
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application.RecognitionFeatures.Builder
clearEnableAutomaticPunctuation()
If `true`, adds punctuation to recognition result hypotheses.RecognitionFeatures.Builder
clearEnableSpokenEmojis()
The spoken emoji behavior for the call.RecognitionFeatures.Builder
clearEnableSpokenPunctuation()
The spoken punctuation behavior for the call.RecognitionFeatures.Builder
clearEnableWordConfidence()
If `true`, the top result includes a list of words and the confidence for those words.RecognitionFeatures.Builder
clearEnableWordTimeOffsets()
If `true`, the top result includes a list of words and the start and end time offsets (timestamps) for those words.RecognitionFeatures.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
RecognitionFeatures.Builder
clearMaxAlternatives()
Maximum number of recognition hypotheses to be returned.RecognitionFeatures.Builder
clearMultiChannelMode()
Mode for recognizing multi-channel audio.RecognitionFeatures.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
RecognitionFeatures.Builder
clearProfanityFilter()
If set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, for instance, "f***".RecognitionFeatures.Builder
clone()
RecognitionFeatures
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
SpeakerDiarizationConfig
getDiarizationConfig()
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application.SpeakerDiarizationConfig.Builder
getDiarizationConfigBuilder()
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application.SpeakerDiarizationConfigOrBuilder
getDiarizationConfigOrBuilder()
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application.boolean
getEnableAutomaticPunctuation()
If `true`, adds punctuation to recognition result hypotheses.boolean
getEnableSpokenEmojis()
The spoken emoji behavior for the call.boolean
getEnableSpokenPunctuation()
The spoken punctuation behavior for the call.boolean
getEnableWordConfidence()
If `true`, the top result includes a list of words and the confidence for those words.boolean
getEnableWordTimeOffsets()
If `true`, the top result includes a list of words and the start and end time offsets (timestamps) for those words.int
getMaxAlternatives()
Maximum number of recognition hypotheses to be returned.RecognitionFeatures.MultiChannelMode
getMultiChannelMode()
Mode for recognizing multi-channel audio.int
getMultiChannelModeValue()
Mode for recognizing multi-channel audio.boolean
getProfanityFilter()
If set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, for instance, "f***".boolean
hasDiarizationConfig()
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
boolean
isInitialized()
RecognitionFeatures.Builder
mergeDiarizationConfig(SpeakerDiarizationConfig value)
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application.RecognitionFeatures.Builder
mergeFrom(RecognitionFeatures other)
RecognitionFeatures.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
RecognitionFeatures.Builder
mergeFrom(com.google.protobuf.Message other)
RecognitionFeatures.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
RecognitionFeatures.Builder
setDiarizationConfig(SpeakerDiarizationConfig value)
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application.RecognitionFeatures.Builder
setDiarizationConfig(SpeakerDiarizationConfig.Builder builderForValue)
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application.RecognitionFeatures.Builder
setEnableAutomaticPunctuation(boolean value)
If `true`, adds punctuation to recognition result hypotheses.RecognitionFeatures.Builder
setEnableSpokenEmojis(boolean value)
The spoken emoji behavior for the call.RecognitionFeatures.Builder
setEnableSpokenPunctuation(boolean value)
The spoken punctuation behavior for the call.RecognitionFeatures.Builder
setEnableWordConfidence(boolean value)
If `true`, the top result includes a list of words and the confidence for those words.RecognitionFeatures.Builder
setEnableWordTimeOffsets(boolean value)
If `true`, the top result includes a list of words and the start and end time offsets (timestamps) for those words.RecognitionFeatures.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
RecognitionFeatures.Builder
setMaxAlternatives(int value)
Maximum number of recognition hypotheses to be returned.RecognitionFeatures.Builder
setMultiChannelMode(RecognitionFeatures.MultiChannelMode value)
Mode for recognizing multi-channel audio.RecognitionFeatures.Builder
setMultiChannelModeValue(int value)
Mode for recognizing multi-channel audio.RecognitionFeatures.Builder
setProfanityFilter(boolean value)
If set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, for instance, "f***".RecognitionFeatures.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
RecognitionFeatures.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<RecognitionFeatures.Builder>
-
clear
public RecognitionFeatures.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<RecognitionFeatures.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<RecognitionFeatures.Builder>
-
getDefaultInstanceForType
public RecognitionFeatures getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public RecognitionFeatures build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public RecognitionFeatures buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public RecognitionFeatures.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<RecognitionFeatures.Builder>
-
setField
public RecognitionFeatures.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RecognitionFeatures.Builder>
-
clearField
public RecognitionFeatures.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RecognitionFeatures.Builder>
-
clearOneof
public RecognitionFeatures.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<RecognitionFeatures.Builder>
-
setRepeatedField
public RecognitionFeatures.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RecognitionFeatures.Builder>
-
addRepeatedField
public RecognitionFeatures.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<RecognitionFeatures.Builder>
-
mergeFrom
public RecognitionFeatures.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<RecognitionFeatures.Builder>
-
mergeFrom
public RecognitionFeatures.Builder mergeFrom(RecognitionFeatures other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<RecognitionFeatures.Builder>
-
mergeFrom
public RecognitionFeatures.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<RecognitionFeatures.Builder>
- Throws:
IOException
-
getProfanityFilter
public boolean getProfanityFilter()
If set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, for instance, "f***". If set to `false` or omitted, profanities won't be filtered out.
bool profanity_filter = 1;
- Specified by:
getProfanityFilter
in interfaceRecognitionFeaturesOrBuilder
- Returns:
- The profanityFilter.
-
setProfanityFilter
public RecognitionFeatures.Builder setProfanityFilter(boolean value)
If set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, for instance, "f***". If set to `false` or omitted, profanities won't be filtered out.
bool profanity_filter = 1;
- Parameters:
value
- The profanityFilter to set.- Returns:
- This builder for chaining.
-
clearProfanityFilter
public RecognitionFeatures.Builder clearProfanityFilter()
If set to `true`, the server will attempt to filter out profanities, replacing all but the initial character in each filtered word with asterisks, for instance, "f***". If set to `false` or omitted, profanities won't be filtered out.
bool profanity_filter = 1;
- Returns:
- This builder for chaining.
-
getEnableWordTimeOffsets
public boolean getEnableWordTimeOffsets()
If `true`, the top result includes a list of words and the start and end time offsets (timestamps) for those words. If `false`, no word-level time offset information is returned. The default is `false`.
bool enable_word_time_offsets = 2;
- Specified by:
getEnableWordTimeOffsets
in interfaceRecognitionFeaturesOrBuilder
- Returns:
- The enableWordTimeOffsets.
-
setEnableWordTimeOffsets
public RecognitionFeatures.Builder setEnableWordTimeOffsets(boolean value)
If `true`, the top result includes a list of words and the start and end time offsets (timestamps) for those words. If `false`, no word-level time offset information is returned. The default is `false`.
bool enable_word_time_offsets = 2;
- Parameters:
value
- The enableWordTimeOffsets to set.- Returns:
- This builder for chaining.
-
clearEnableWordTimeOffsets
public RecognitionFeatures.Builder clearEnableWordTimeOffsets()
If `true`, the top result includes a list of words and the start and end time offsets (timestamps) for those words. If `false`, no word-level time offset information is returned. The default is `false`.
bool enable_word_time_offsets = 2;
- Returns:
- This builder for chaining.
-
getEnableWordConfidence
public boolean getEnableWordConfidence()
If `true`, the top result includes a list of words and the confidence for those words. If `false`, no word-level confidence information is returned. The default is `false`.
bool enable_word_confidence = 3;
- Specified by:
getEnableWordConfidence
in interfaceRecognitionFeaturesOrBuilder
- Returns:
- The enableWordConfidence.
-
setEnableWordConfidence
public RecognitionFeatures.Builder setEnableWordConfidence(boolean value)
If `true`, the top result includes a list of words and the confidence for those words. If `false`, no word-level confidence information is returned. The default is `false`.
bool enable_word_confidence = 3;
- Parameters:
value
- The enableWordConfidence to set.- Returns:
- This builder for chaining.
-
clearEnableWordConfidence
public RecognitionFeatures.Builder clearEnableWordConfidence()
If `true`, the top result includes a list of words and the confidence for those words. If `false`, no word-level confidence information is returned. The default is `false`.
bool enable_word_confidence = 3;
- Returns:
- This builder for chaining.
-
getEnableAutomaticPunctuation
public boolean getEnableAutomaticPunctuation()
If `true`, adds punctuation to recognition result hypotheses. This feature is only available in select languages. The default `false` value does not add punctuation to result hypotheses.
bool enable_automatic_punctuation = 4;
- Specified by:
getEnableAutomaticPunctuation
in interfaceRecognitionFeaturesOrBuilder
- Returns:
- The enableAutomaticPunctuation.
-
setEnableAutomaticPunctuation
public RecognitionFeatures.Builder setEnableAutomaticPunctuation(boolean value)
If `true`, adds punctuation to recognition result hypotheses. This feature is only available in select languages. The default `false` value does not add punctuation to result hypotheses.
bool enable_automatic_punctuation = 4;
- Parameters:
value
- The enableAutomaticPunctuation to set.- Returns:
- This builder for chaining.
-
clearEnableAutomaticPunctuation
public RecognitionFeatures.Builder clearEnableAutomaticPunctuation()
If `true`, adds punctuation to recognition result hypotheses. This feature is only available in select languages. The default `false` value does not add punctuation to result hypotheses.
bool enable_automatic_punctuation = 4;
- Returns:
- This builder for chaining.
-
getEnableSpokenPunctuation
public boolean getEnableSpokenPunctuation()
The spoken punctuation behavior for the call. If `true`, replaces spoken punctuation with the corresponding symbols in the request. For example, "how are you question mark" becomes "how are you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation for support. If `false`, spoken punctuation is not replaced.
bool enable_spoken_punctuation = 14;
- Specified by:
getEnableSpokenPunctuation
in interfaceRecognitionFeaturesOrBuilder
- Returns:
- The enableSpokenPunctuation.
-
setEnableSpokenPunctuation
public RecognitionFeatures.Builder setEnableSpokenPunctuation(boolean value)
The spoken punctuation behavior for the call. If `true`, replaces spoken punctuation with the corresponding symbols in the request. For example, "how are you question mark" becomes "how are you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation for support. If `false`, spoken punctuation is not replaced.
bool enable_spoken_punctuation = 14;
- Parameters:
value
- The enableSpokenPunctuation to set.- Returns:
- This builder for chaining.
-
clearEnableSpokenPunctuation
public RecognitionFeatures.Builder clearEnableSpokenPunctuation()
The spoken punctuation behavior for the call. If `true`, replaces spoken punctuation with the corresponding symbols in the request. For example, "how are you question mark" becomes "how are you?". See https://cloud.google.com/speech-to-text/docs/spoken-punctuation for support. If `false`, spoken punctuation is not replaced.
bool enable_spoken_punctuation = 14;
- Returns:
- This builder for chaining.
-
getEnableSpokenEmojis
public boolean getEnableSpokenEmojis()
The spoken emoji behavior for the call. If `true`, adds spoken emoji formatting for the request. This will replace spoken emojis with the corresponding Unicode symbols in the final transcript. If `false`, spoken emojis are not replaced.
bool enable_spoken_emojis = 15;
- Specified by:
getEnableSpokenEmojis
in interfaceRecognitionFeaturesOrBuilder
- Returns:
- The enableSpokenEmojis.
-
setEnableSpokenEmojis
public RecognitionFeatures.Builder setEnableSpokenEmojis(boolean value)
The spoken emoji behavior for the call. If `true`, adds spoken emoji formatting for the request. This will replace spoken emojis with the corresponding Unicode symbols in the final transcript. If `false`, spoken emojis are not replaced.
bool enable_spoken_emojis = 15;
- Parameters:
value
- The enableSpokenEmojis to set.- Returns:
- This builder for chaining.
-
clearEnableSpokenEmojis
public RecognitionFeatures.Builder clearEnableSpokenEmojis()
The spoken emoji behavior for the call. If `true`, adds spoken emoji formatting for the request. This will replace spoken emojis with the corresponding Unicode symbols in the final transcript. If `false`, spoken emojis are not replaced.
bool enable_spoken_emojis = 15;
- Returns:
- This builder for chaining.
-
getMultiChannelModeValue
public int getMultiChannelModeValue()
Mode for recognizing multi-channel audio.
.google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode multi_channel_mode = 17;
- Specified by:
getMultiChannelModeValue
in interfaceRecognitionFeaturesOrBuilder
- Returns:
- The enum numeric value on the wire for multiChannelMode.
-
setMultiChannelModeValue
public RecognitionFeatures.Builder setMultiChannelModeValue(int value)
Mode for recognizing multi-channel audio.
.google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode multi_channel_mode = 17;
- Parameters:
value
- The enum numeric value on the wire for multiChannelMode to set.- Returns:
- This builder for chaining.
-
getMultiChannelMode
public RecognitionFeatures.MultiChannelMode getMultiChannelMode()
Mode for recognizing multi-channel audio.
.google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode multi_channel_mode = 17;
- Specified by:
getMultiChannelMode
in interfaceRecognitionFeaturesOrBuilder
- Returns:
- The multiChannelMode.
-
setMultiChannelMode
public RecognitionFeatures.Builder setMultiChannelMode(RecognitionFeatures.MultiChannelMode value)
Mode for recognizing multi-channel audio.
.google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode multi_channel_mode = 17;
- Parameters:
value
- The multiChannelMode to set.- Returns:
- This builder for chaining.
-
clearMultiChannelMode
public RecognitionFeatures.Builder clearMultiChannelMode()
Mode for recognizing multi-channel audio.
.google.cloud.speech.v2.RecognitionFeatures.MultiChannelMode multi_channel_mode = 17;
- Returns:
- This builder for chaining.
-
hasDiarizationConfig
public boolean hasDiarizationConfig()
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application. When this is enabled, we send all the words from the beginning of the audio for the top alternative in every consecutive STREAMING responses. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time. For non-streaming requests, the diarization results will be provided only in the top alternative of the FINAL SpeechRecognitionResult.
.google.cloud.speech.v2.SpeakerDiarizationConfig diarization_config = 9;
- Specified by:
hasDiarizationConfig
in interfaceRecognitionFeaturesOrBuilder
- Returns:
- Whether the diarizationConfig field is set.
-
getDiarizationConfig
public SpeakerDiarizationConfig getDiarizationConfig()
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application. When this is enabled, we send all the words from the beginning of the audio for the top alternative in every consecutive STREAMING responses. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time. For non-streaming requests, the diarization results will be provided only in the top alternative of the FINAL SpeechRecognitionResult.
.google.cloud.speech.v2.SpeakerDiarizationConfig diarization_config = 9;
- Specified by:
getDiarizationConfig
in interfaceRecognitionFeaturesOrBuilder
- Returns:
- The diarizationConfig.
-
setDiarizationConfig
public RecognitionFeatures.Builder setDiarizationConfig(SpeakerDiarizationConfig value)
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application. When this is enabled, we send all the words from the beginning of the audio for the top alternative in every consecutive STREAMING responses. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time. For non-streaming requests, the diarization results will be provided only in the top alternative of the FINAL SpeechRecognitionResult.
.google.cloud.speech.v2.SpeakerDiarizationConfig diarization_config = 9;
-
setDiarizationConfig
public RecognitionFeatures.Builder setDiarizationConfig(SpeakerDiarizationConfig.Builder builderForValue)
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application. When this is enabled, we send all the words from the beginning of the audio for the top alternative in every consecutive STREAMING responses. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time. For non-streaming requests, the diarization results will be provided only in the top alternative of the FINAL SpeechRecognitionResult.
.google.cloud.speech.v2.SpeakerDiarizationConfig diarization_config = 9;
-
mergeDiarizationConfig
public RecognitionFeatures.Builder mergeDiarizationConfig(SpeakerDiarizationConfig value)
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application. When this is enabled, we send all the words from the beginning of the audio for the top alternative in every consecutive STREAMING responses. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time. For non-streaming requests, the diarization results will be provided only in the top alternative of the FINAL SpeechRecognitionResult.
.google.cloud.speech.v2.SpeakerDiarizationConfig diarization_config = 9;
-
clearDiarizationConfig
public RecognitionFeatures.Builder clearDiarizationConfig()
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application. When this is enabled, we send all the words from the beginning of the audio for the top alternative in every consecutive STREAMING responses. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time. For non-streaming requests, the diarization results will be provided only in the top alternative of the FINAL SpeechRecognitionResult.
.google.cloud.speech.v2.SpeakerDiarizationConfig diarization_config = 9;
-
getDiarizationConfigBuilder
public SpeakerDiarizationConfig.Builder getDiarizationConfigBuilder()
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application. When this is enabled, we send all the words from the beginning of the audio for the top alternative in every consecutive STREAMING responses. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time. For non-streaming requests, the diarization results will be provided only in the top alternative of the FINAL SpeechRecognitionResult.
.google.cloud.speech.v2.SpeakerDiarizationConfig diarization_config = 9;
-
getDiarizationConfigOrBuilder
public SpeakerDiarizationConfigOrBuilder getDiarizationConfigOrBuilder()
Configuration to enable speaker diarization and set additional parameters to make diarization better suited for your application. When this is enabled, we send all the words from the beginning of the audio for the top alternative in every consecutive STREAMING responses. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time. For non-streaming requests, the diarization results will be provided only in the top alternative of the FINAL SpeechRecognitionResult.
.google.cloud.speech.v2.SpeakerDiarizationConfig diarization_config = 9;
- Specified by:
getDiarizationConfigOrBuilder
in interfaceRecognitionFeaturesOrBuilder
-
getMaxAlternatives
public int getMaxAlternatives()
Maximum number of recognition hypotheses to be returned. The server may return fewer than `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of one. If omitted, will return a maximum of one.
int32 max_alternatives = 16;
- Specified by:
getMaxAlternatives
in interfaceRecognitionFeaturesOrBuilder
- Returns:
- The maxAlternatives.
-
setMaxAlternatives
public RecognitionFeatures.Builder setMaxAlternatives(int value)
Maximum number of recognition hypotheses to be returned. The server may return fewer than `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of one. If omitted, will return a maximum of one.
int32 max_alternatives = 16;
- Parameters:
value
- The maxAlternatives to set.- Returns:
- This builder for chaining.
-
clearMaxAlternatives
public RecognitionFeatures.Builder clearMaxAlternatives()
Maximum number of recognition hypotheses to be returned. The server may return fewer than `max_alternatives`. Valid values are `0`-`30`. A value of `0` or `1` will return a maximum of one. If omitted, will return a maximum of one.
int32 max_alternatives = 16;
- Returns:
- This builder for chaining.
-
setUnknownFields
public final RecognitionFeatures.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<RecognitionFeatures.Builder>
-
mergeUnknownFields
public final RecognitionFeatures.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<RecognitionFeatures.Builder>
-
-