Class SpeechContext.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
- com.google.cloud.videointelligence.v1p3beta1.SpeechContext.Builder
-
- All Implemented Interfaces:
SpeechContextOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- SpeechContext
public static final class SpeechContext.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder> implements SpeechContextOrBuilder
Provides "hints" to the speech recognizer to favor specific words and phrases in the results.
Protobuf typegoogle.cloud.videointelligence.v1p3beta1.SpeechContext
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SpeechContext.BuilderaddAllPhrases(Iterable<String> values)Optional.SpeechContext.BuilderaddPhrases(String value)Optional.SpeechContext.BuilderaddPhrasesBytes(com.google.protobuf.ByteString value)Optional.SpeechContext.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)SpeechContextbuild()SpeechContextbuildPartial()SpeechContext.Builderclear()SpeechContext.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)SpeechContext.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)SpeechContext.BuilderclearPhrases()Optional.SpeechContext.Builderclone()SpeechContextgetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()StringgetPhrases(int index)Optional.com.google.protobuf.ByteStringgetPhrasesBytes(int index)Optional.intgetPhrasesCount()Optional.com.google.protobuf.ProtocolStringListgetPhrasesList()Optional.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()booleanisInitialized()SpeechContext.BuildermergeFrom(SpeechContext other)SpeechContext.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)SpeechContext.BuildermergeFrom(com.google.protobuf.Message other)SpeechContext.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)SpeechContext.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)SpeechContext.BuildersetPhrases(int index, String value)Optional.SpeechContext.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)SpeechContext.BuildersetUnknownFields(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:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
clear
public SpeechContext.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
getDefaultInstanceForType
public SpeechContext getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public SpeechContext build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public SpeechContext buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public SpeechContext.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
setField
public SpeechContext.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
clearField
public SpeechContext.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
clearOneof
public SpeechContext.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
setRepeatedField
public SpeechContext.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
addRepeatedField
public SpeechContext.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
mergeFrom
public SpeechContext.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SpeechContext.Builder>
-
mergeFrom
public SpeechContext.Builder mergeFrom(SpeechContext other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
mergeFrom
public SpeechContext.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<SpeechContext.Builder>- Throws:
IOException
-
getPhrasesList
public com.google.protobuf.ProtocolStringList getPhrasesList()
Optional. A list of strings containing words and phrases "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech/limits#content).
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPhrasesListin interfaceSpeechContextOrBuilder- Returns:
- A list containing the phrases.
-
getPhrasesCount
public int getPhrasesCount()
Optional. A list of strings containing words and phrases "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech/limits#content).
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPhrasesCountin interfaceSpeechContextOrBuilder- Returns:
- The count of phrases.
-
getPhrases
public String getPhrases(int index)
Optional. A list of strings containing words and phrases "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech/limits#content).
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPhrasesin interfaceSpeechContextOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The phrases at the given index.
-
getPhrasesBytes
public com.google.protobuf.ByteString getPhrasesBytes(int index)
Optional. A list of strings containing words and phrases "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech/limits#content).
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];- Specified by:
getPhrasesBytesin interfaceSpeechContextOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the phrases at the given index.
-
setPhrases
public SpeechContext.Builder setPhrases(int index, String value)
Optional. A list of strings containing words and phrases "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech/limits#content).
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
index- The index to set the value at.value- The phrases to set.- Returns:
- This builder for chaining.
-
addPhrases
public SpeechContext.Builder addPhrases(String value)
Optional. A list of strings containing words and phrases "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech/limits#content).
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The phrases to add.- Returns:
- This builder for chaining.
-
addAllPhrases
public SpeechContext.Builder addAllPhrases(Iterable<String> values)
Optional. A list of strings containing words and phrases "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech/limits#content).
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
values- The phrases to add.- Returns:
- This builder for chaining.
-
clearPhrases
public SpeechContext.Builder clearPhrases()
Optional. A list of strings containing words and phrases "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech/limits#content).
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];- Returns:
- This builder for chaining.
-
addPhrasesBytes
public SpeechContext.Builder addPhrasesBytes(com.google.protobuf.ByteString value)
Optional. A list of strings containing words and phrases "hints" so that the speech recognition is more likely to recognize them. This can be used to improve the accuracy for specific words and phrases, for example, if specific commands are typically spoken by the user. This can also be used to add additional words to the vocabulary of the recognizer. See [usage limits](https://cloud.google.com/speech/limits#content).
repeated string phrases = 1 [(.google.api.field_behavior) = OPTIONAL];- Parameters:
value- The bytes of the phrases to add.- Returns:
- This builder for chaining.
-
setUnknownFields
public final SpeechContext.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
mergeUnknownFields
public final SpeechContext.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<SpeechContext.Builder>
-
-