Package com.google.cloud.dialogflow.v2
Class SpeechToTextConfig
java.lang.Object
com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessage
com.google.protobuf.GeneratedMessage
com.google.cloud.dialogflow.v2.SpeechToTextConfig
- All Implemented Interfaces:
SpeechToTextConfigOrBuilder,com.google.protobuf.Message,com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Serializable
@Generated
public final class SpeechToTextConfig
extends com.google.protobuf.GeneratedMessage
implements SpeechToTextConfigOrBuilder
Configures speech transcription for [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile].Protobuf type
google.cloud.dialogflow.v2.SpeechToTextConfig- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classConfigures speech transcription for [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile].Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessage
com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>,BuilderT extends com.google.protobuf.GeneratedMessage.ExtendableBuilder<MessageT, BuilderT>>, com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<MessageT extends com.google.protobuf.GeneratedMessage.ExtendableMessage<MessageT>>, com.google.protobuf.GeneratedMessage.FieldAccessorTable, com.google.protobuf.GeneratedMessage.GeneratedExtension<ContainingT extends com.google.protobuf.Message, T extends Object>, com.google.protobuf.GeneratedMessage.UnusedPrivateParameter Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessage
com.google.protobuf.AbstractMessage.BuilderParentNested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessage
alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFieldsFields inherited from class com.google.protobuf.AbstractMessage
memoizedSizeFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleanAudio encoding of the audio content to process.intAudio encoding of the audio content to process.static SpeechToTextConfigstatic final com.google.protobuf.Descriptors.DescriptorbooleanIf `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] with information about the recognized speech words, e.g. start and end time offsets.The language of the supplied audio.com.google.protobuf.ByteStringThe language of the supplied audio.getModel()Which Speech model to select.com.google.protobuf.ByteStringWhich Speech model to select.com.google.protobuf.Parser<SpeechToTextConfig>getPhraseSets(int index) List of names of Cloud Speech phrase sets that are used for transcription.com.google.protobuf.ByteStringgetPhraseSetsBytes(int index) List of names of Cloud Speech phrase sets that are used for transcription.intList of names of Cloud Speech phrase sets that are used for transcription.com.google.protobuf.ProtocolStringListList of names of Cloud Speech phrase sets that are used for transcription.intSample rate (in Hertz) of the audio content sent in the query.intThe speech model used in speech to text.intThe speech model used in speech to text.booleanUse timeout based endpointing, interpreting endpointer sensitivity as seconds of timeout value.inthashCode()protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanstatic SpeechToTextConfig.Builderstatic SpeechToTextConfig.BuildernewBuilder(SpeechToTextConfig prototype) protected SpeechToTextConfig.BuildernewBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) static SpeechToTextConfigparseDelimitedFrom(InputStream input) static SpeechToTextConfigparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SpeechToTextConfigparseFrom(byte[] data) static SpeechToTextConfigparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SpeechToTextConfigparseFrom(com.google.protobuf.ByteString data) static SpeechToTextConfigparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SpeechToTextConfigparseFrom(com.google.protobuf.CodedInputStream input) static SpeechToTextConfigparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SpeechToTextConfigparseFrom(InputStream input) static SpeechToTextConfigparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static SpeechToTextConfigparseFrom(ByteBuffer data) static SpeechToTextConfigparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<SpeechToTextConfig>parser()voidwriteTo(com.google.protobuf.CodedOutputStream output) Methods inherited from class com.google.protobuf.GeneratedMessage
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, isStringEmpty, makeExtensionsImmutable, makeMutableCopy, makeMutableCopy, mergeFromAndMakeImmutableInternal, newFileScopedGeneratedExtension, newInstance, newMessageScopedGeneratedExtension, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagMethods inherited from class com.google.protobuf.AbstractMessage
findInitializationErrors, getInitializationErrorString, hashFields, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLite
toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Field Details
-
SPEECH_MODEL_VARIANT_FIELD_NUMBER
public static final int SPEECH_MODEL_VARIANT_FIELD_NUMBER- See Also:
-
MODEL_FIELD_NUMBER
public static final int MODEL_FIELD_NUMBER- See Also:
-
PHRASE_SETS_FIELD_NUMBER
public static final int PHRASE_SETS_FIELD_NUMBER- See Also:
-
AUDIO_ENCODING_FIELD_NUMBER
public static final int AUDIO_ENCODING_FIELD_NUMBER- See Also:
-
SAMPLE_RATE_HERTZ_FIELD_NUMBER
public static final int SAMPLE_RATE_HERTZ_FIELD_NUMBER- See Also:
-
LANGUAGE_CODE_FIELD_NUMBER
public static final int LANGUAGE_CODE_FIELD_NUMBER- See Also:
-
ENABLE_WORD_INFO_FIELD_NUMBER
public static final int ENABLE_WORD_INFO_FIELD_NUMBER- See Also:
-
USE_TIMEOUT_BASED_ENDPOINTING_FIELD_NUMBER
public static final int USE_TIMEOUT_BASED_ENDPOINTING_FIELD_NUMBER- See Also:
-
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage
-
getSpeechModelVariantValue
public int getSpeechModelVariantValue()The speech model used in speech to text. `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as `USE_ENHANCED`. It can be overridden in [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] and [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] request. If enhanced model variant is specified and an enhanced version of the specified model for the language does not exist, then it would emit an error.
.google.cloud.dialogflow.v2.SpeechModelVariant speech_model_variant = 1;- Specified by:
getSpeechModelVariantValuein interfaceSpeechToTextConfigOrBuilder- Returns:
- The enum numeric value on the wire for speechModelVariant.
-
getSpeechModelVariant
The speech model used in speech to text. `SPEECH_MODEL_VARIANT_UNSPECIFIED`, `USE_BEST_AVAILABLE` will be treated as `USE_ENHANCED`. It can be overridden in [AnalyzeContentRequest][google.cloud.dialogflow.v2.AnalyzeContentRequest] and [StreamingAnalyzeContentRequest][google.cloud.dialogflow.v2.StreamingAnalyzeContentRequest] request. If enhanced model variant is specified and an enhanced version of the specified model for the language does not exist, then it would emit an error.
.google.cloud.dialogflow.v2.SpeechModelVariant speech_model_variant = 1;- Specified by:
getSpeechModelVariantin interfaceSpeechToTextConfigOrBuilder- Returns:
- The speechModelVariant.
-
getModel
Which Speech model to select. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then Dialogflow auto-selects a model based on other parameters in the SpeechToTextConfig and Agent settings. If enhanced speech model is enabled for the agent and an enhanced version of the specified model for the language does not exist, then the speech is recognized using the standard version of the specified model. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) for more details. If you specify a model, the following models typically have the best performance: - phone_call (best for Agent Assist and telephony) - latest_short (best for Dialogflow non-telephony) - command_and_search Leave this field unspecified to use [Agent Speech settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech) for model selection.
string model = 2;- Specified by:
getModelin interfaceSpeechToTextConfigOrBuilder- Returns:
- The model.
-
getModelBytes
public com.google.protobuf.ByteString getModelBytes()Which Speech model to select. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then Dialogflow auto-selects a model based on other parameters in the SpeechToTextConfig and Agent settings. If enhanced speech model is enabled for the agent and an enhanced version of the specified model for the language does not exist, then the speech is recognized using the standard version of the specified model. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics#select-model) for more details. If you specify a model, the following models typically have the best performance: - phone_call (best for Agent Assist and telephony) - latest_short (best for Dialogflow non-telephony) - command_and_search Leave this field unspecified to use [Agent Speech settings](https://cloud.google.com/dialogflow/cx/docs/concept/agent#settings-speech) for model selection.
string model = 2;- Specified by:
getModelBytesin interfaceSpeechToTextConfigOrBuilder- Returns:
- The bytes for model.
-
getPhraseSetsList
public com.google.protobuf.ProtocolStringList getPhraseSetsList()List of names of Cloud Speech phrase sets that are used for transcription. For phrase set limitations, please refer to [Cloud Speech API quotas and limits](https://cloud.google.com/speech-to-text/quotas#content).
repeated string phrase_sets = 4 [(.google.api.resource_reference) = { ... }- Specified by:
getPhraseSetsListin interfaceSpeechToTextConfigOrBuilder- Returns:
- A list containing the phraseSets.
-
getPhraseSetsCount
public int getPhraseSetsCount()List of names of Cloud Speech phrase sets that are used for transcription. For phrase set limitations, please refer to [Cloud Speech API quotas and limits](https://cloud.google.com/speech-to-text/quotas#content).
repeated string phrase_sets = 4 [(.google.api.resource_reference) = { ... }- Specified by:
getPhraseSetsCountin interfaceSpeechToTextConfigOrBuilder- Returns:
- The count of phraseSets.
-
getPhraseSets
List of names of Cloud Speech phrase sets that are used for transcription. For phrase set limitations, please refer to [Cloud Speech API quotas and limits](https://cloud.google.com/speech-to-text/quotas#content).
repeated string phrase_sets = 4 [(.google.api.resource_reference) = { ... }- Specified by:
getPhraseSetsin interfaceSpeechToTextConfigOrBuilder- Parameters:
index- The index of the element to return.- Returns:
- The phraseSets at the given index.
-
getPhraseSetsBytes
public com.google.protobuf.ByteString getPhraseSetsBytes(int index) List of names of Cloud Speech phrase sets that are used for transcription. For phrase set limitations, please refer to [Cloud Speech API quotas and limits](https://cloud.google.com/speech-to-text/quotas#content).
repeated string phrase_sets = 4 [(.google.api.resource_reference) = { ... }- Specified by:
getPhraseSetsBytesin interfaceSpeechToTextConfigOrBuilder- Parameters:
index- The index of the value to return.- Returns:
- The bytes of the phraseSets at the given index.
-
getAudioEncodingValue
public int getAudioEncodingValue()Audio encoding of the audio content to process.
.google.cloud.dialogflow.v2.AudioEncoding audio_encoding = 6;- Specified by:
getAudioEncodingValuein interfaceSpeechToTextConfigOrBuilder- Returns:
- The enum numeric value on the wire for audioEncoding.
-
getAudioEncoding
Audio encoding of the audio content to process.
.google.cloud.dialogflow.v2.AudioEncoding audio_encoding = 6;- Specified by:
getAudioEncodingin interfaceSpeechToTextConfigOrBuilder- Returns:
- The audioEncoding.
-
getSampleRateHertz
public int getSampleRateHertz()Sample rate (in Hertz) of the audio content sent in the query. Refer to [Cloud Speech API documentation](https://cloud.google.com/speech-to-text/docs/basics) for more details.
int32 sample_rate_hertz = 7;- Specified by:
getSampleRateHertzin interfaceSpeechToTextConfigOrBuilder- Returns:
- The sampleRateHertz.
-
getLanguageCode
The language of the supplied audio. Dialogflow does not do translations. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. If not specified, the default language configured at [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] is used.
string language_code = 8;- Specified by:
getLanguageCodein interfaceSpeechToTextConfigOrBuilder- Returns:
- The languageCode.
-
getLanguageCodeBytes
public com.google.protobuf.ByteString getLanguageCodeBytes()The language of the supplied audio. Dialogflow does not do translations. See [Language Support](https://cloud.google.com/dialogflow/docs/reference/language) for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. If not specified, the default language configured at [ConversationProfile][google.cloud.dialogflow.v2.ConversationProfile] is used.
string language_code = 8;- Specified by:
getLanguageCodeBytesin interfaceSpeechToTextConfigOrBuilder- Returns:
- The bytes for languageCode.
-
getEnableWordInfo
public boolean getEnableWordInfo()If `true`, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2.SpeechWordInfo] in [StreamingRecognitionResult][google.cloud.dialogflow.v2.StreamingRecognitionResult] with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn't return any word-level information.
bool enable_word_info = 9;- Specified by:
getEnableWordInfoin interfaceSpeechToTextConfigOrBuilder- Returns:
- The enableWordInfo.
-
getUseTimeoutBasedEndpointing
public boolean getUseTimeoutBasedEndpointing()Use timeout based endpointing, interpreting endpointer sensitivity as seconds of timeout value.
bool use_timeout_based_endpointing = 11;- Specified by:
getUseTimeoutBasedEndpointingin interfaceSpeechToTextConfigOrBuilder- Returns:
- The useTimeoutBasedEndpointing.
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage
-
writeTo
- Specified by:
writeToin interfacecom.google.protobuf.MessageLite- Overrides:
writeToin classcom.google.protobuf.GeneratedMessage- Throws:
IOException
-
getSerializedSize
public int getSerializedSize()- Specified by:
getSerializedSizein interfacecom.google.protobuf.MessageLite- Overrides:
getSerializedSizein classcom.google.protobuf.GeneratedMessage
-
equals
- Specified by:
equalsin interfacecom.google.protobuf.Message- Overrides:
equalsin classcom.google.protobuf.AbstractMessage
-
hashCode
public int hashCode()- Specified by:
hashCodein interfacecom.google.protobuf.Message- Overrides:
hashCodein classcom.google.protobuf.AbstractMessage
-
parseFrom
public static SpeechToTextConfig parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SpeechToTextConfig parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SpeechToTextConfig parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SpeechToTextConfig parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SpeechToTextConfig parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static SpeechToTextConfig parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static SpeechToTextConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static SpeechToTextConfig parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static SpeechToTextConfig parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static SpeechToTextConfig parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilderForType
- Specified by:
newBuilderForTypein interfacecom.google.protobuf.Message- Specified by:
newBuilderForTypein interfacecom.google.protobuf.MessageLite
-
newBuilder
-
newBuilder
-
toBuilder
- Specified by:
toBuilderin interfacecom.google.protobuf.Message- Specified by:
toBuilderin interfacecom.google.protobuf.MessageLite
-
newBuilderForType
protected SpeechToTextConfig.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent) - Overrides:
newBuilderForTypein classcom.google.protobuf.AbstractMessage
-
getDefaultInstance
-
parser
-
getParserForType
- Specified by:
getParserForTypein interfacecom.google.protobuf.Message- Specified by:
getParserForTypein interfacecom.google.protobuf.MessageLite- Overrides:
getParserForTypein classcom.google.protobuf.GeneratedMessage
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-