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 Classes
    Modifier and Type
    Class
    Description
    static final class 
    Configures 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.BuilderParent

    Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite

    com.google.protobuf.AbstractMessageLite.InternalOneOfEnum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     
    static final int
     

    Fields inherited from class com.google.protobuf.GeneratedMessage

    alwaysUseFieldBuilders, loggedPre22TypeNames, unknownFields

    Fields inherited from class com.google.protobuf.AbstractMessage

    memoizedSize

    Fields inherited from class com.google.protobuf.AbstractMessageLite

    memoizedHashCode
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    Audio encoding of the audio content to process.
    int
    Audio encoding of the audio content to process.
     
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    boolean
    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.
    The language of the supplied audio.
    com.google.protobuf.ByteString
    The language of the supplied audio.
    Which Speech model to select.
    com.google.protobuf.ByteString
    Which 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.ByteString
    getPhraseSetsBytes(int index)
    List of names of Cloud Speech phrase sets that are used for transcription.
    int
    List of names of Cloud Speech phrase sets that are used for transcription.
    com.google.protobuf.ProtocolStringList
    List of names of Cloud Speech phrase sets that are used for transcription.
    int
    Sample rate (in Hertz) of the audio content sent in the query.
    int
     
    The speech model used in speech to text.
    int
    The speech model used in speech to text.
    boolean
    Use timeout based endpointing, interpreting endpointer sensitivity as seconds of timeout value.
    int
     
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
     
     
     
    newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
     
     
    parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(byte[] data)
     
    parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.ByteString data)
     
    parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    parseFrom(com.google.protobuf.CodedInputStream input)
     
    parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
     
    parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    static com.google.protobuf.Parser<SpeechToTextConfig>
     
     
    void
    writeTo(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, writeStringNoTag

    Methods inherited from class com.google.protobuf.AbstractMessage

    findInitializationErrors, getInitializationErrorString, hashFields, toString

    Methods inherited from class com.google.protobuf.AbstractMessageLite

    addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface com.google.protobuf.MessageLite

    toByteArray, toByteString, writeDelimitedTo, writeTo

    Methods 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:
      internalGetFieldAccessorTable in class com.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:
      getSpeechModelVariantValue in interface SpeechToTextConfigOrBuilder
      Returns:
      The enum numeric value on the wire for speechModelVariant.
    • getSpeechModelVariant

      public 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:
      getSpeechModelVariant in interface SpeechToTextConfigOrBuilder
      Returns:
      The speechModelVariant.
    • getModel

      public String 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:
      getModel in interface SpeechToTextConfigOrBuilder
      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:
      getModelBytes in interface SpeechToTextConfigOrBuilder
      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:
      getPhraseSetsList in interface SpeechToTextConfigOrBuilder
      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:
      getPhraseSetsCount in interface SpeechToTextConfigOrBuilder
      Returns:
      The count of phraseSets.
    • getPhraseSets

      public String getPhraseSets(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:
      getPhraseSets in interface SpeechToTextConfigOrBuilder
      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:
      getPhraseSetsBytes in interface SpeechToTextConfigOrBuilder
      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:
      getAudioEncodingValue in interface SpeechToTextConfigOrBuilder
      Returns:
      The enum numeric value on the wire for audioEncoding.
    • getAudioEncoding

      public AudioEncoding getAudioEncoding()
       Audio encoding of the audio content to process.
       
      .google.cloud.dialogflow.v2.AudioEncoding audio_encoding = 6;
      Specified by:
      getAudioEncoding in interface SpeechToTextConfigOrBuilder
      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:
      getSampleRateHertz in interface SpeechToTextConfigOrBuilder
      Returns:
      The sampleRateHertz.
    • getLanguageCode

      public String 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:
      getLanguageCode in interface SpeechToTextConfigOrBuilder
      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:
      getLanguageCodeBytes in interface SpeechToTextConfigOrBuilder
      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:
      getEnableWordInfo in interface SpeechToTextConfigOrBuilder
      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:
      getUseTimeoutBasedEndpointing in interface SpeechToTextConfigOrBuilder
      Returns:
      The useTimeoutBasedEndpointing.
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage
    • writeTo

      public void writeTo(com.google.protobuf.CodedOutputStream output) throws IOException
      Specified by:
      writeTo in interface com.google.protobuf.MessageLite
      Overrides:
      writeTo in class com.google.protobuf.GeneratedMessage
      Throws:
      IOException
    • getSerializedSize

      public int getSerializedSize()
      Specified by:
      getSerializedSize in interface com.google.protobuf.MessageLite
      Overrides:
      getSerializedSize in class com.google.protobuf.GeneratedMessage
    • equals

      public boolean equals(Object obj)
      Specified by:
      equals in interface com.google.protobuf.Message
      Overrides:
      equals in class com.google.protobuf.AbstractMessage
    • hashCode

      public int hashCode()
      Specified by:
      hashCode in interface com.google.protobuf.Message
      Overrides:
      hashCode in class com.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

      public static SpeechToTextConfig parseFrom(InputStream input) throws IOException
      Throws:
      IOException
    • parseFrom

      public static SpeechToTextConfig parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Throws:
      IOException
    • parseDelimitedFrom

      public static SpeechToTextConfig parseDelimitedFrom(InputStream input) throws IOException
      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

      public SpeechToTextConfig.Builder newBuilderForType()
      Specified by:
      newBuilderForType in interface com.google.protobuf.Message
      Specified by:
      newBuilderForType in interface com.google.protobuf.MessageLite
    • newBuilder

      public static SpeechToTextConfig.Builder newBuilder()
    • newBuilder

      public static SpeechToTextConfig.Builder newBuilder(SpeechToTextConfig prototype)
    • toBuilder

      public SpeechToTextConfig.Builder toBuilder()
      Specified by:
      toBuilder in interface com.google.protobuf.Message
      Specified by:
      toBuilder in interface com.google.protobuf.MessageLite
    • newBuilderForType

      protected SpeechToTextConfig.Builder newBuilderForType(com.google.protobuf.AbstractMessage.BuilderParent parent)
      Overrides:
      newBuilderForType in class com.google.protobuf.AbstractMessage
    • getDefaultInstance

      public static SpeechToTextConfig getDefaultInstance()
    • parser

      public static com.google.protobuf.Parser<SpeechToTextConfig> parser()
    • getParserForType

      public com.google.protobuf.Parser<SpeechToTextConfig> getParserForType()
      Specified by:
      getParserForType in interface com.google.protobuf.Message
      Specified by:
      getParserForType in interface com.google.protobuf.MessageLite
      Overrides:
      getParserForType in class com.google.protobuf.GeneratedMessage
    • getDefaultInstanceForType

      public SpeechToTextConfig getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder