Class: Google::Cloud::Speech::V2::StreamingRecognitionFeatures

Inherits:
Object
  • Object
show all
Extended by:
Protobuf::MessageExts::ClassMethods
Includes:
Protobuf::MessageExts
Defined in:
proto_docs/google/cloud/speech/v2/cloud_speech.rb

Overview

Available recognition features specific to streaming recognition requests.

Defined Under Namespace

Modules: EndpointingSensitivity Classes: VoiceActivityTimeout

Instance Attribute Summary collapse

Instance Attribute Details

#enable_voice_activity_events::Boolean

Returns If true, responses with voice activity speech events will be returned as they are detected.

Returns:

  • (::Boolean)

    If true, responses with voice activity speech events will be returned as they are detected.



944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 944

class StreamingRecognitionFeatures
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Events that a timeout can be set on for voice activity.
  # @!attribute [rw] speech_start_timeout
  #   @return [::Google::Protobuf::Duration]
  #     Duration to timeout the stream if no speech begins. If this is set and
  #     no speech is detected in this duration at the start of the stream, the
  #     server will close the stream.
  # @!attribute [rw] speech_end_timeout
  #   @return [::Google::Protobuf::Duration]
  #     Duration to timeout the stream after speech ends. If this is set and no
  #     speech is detected in this duration after speech was detected, the server
  #     will close the stream.
  class VoiceActivityTimeout
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Endpointing sensitivity is intended for applications that want to minimize
  # result latency, possibly at the expense of quality. Some utterances may be
  # broken up into multiple fragments.
  module EndpointingSensitivity
    # If no value is specified, the values for
    # ENDPOINTING_SENSITIVITY_STANDARD will be used.
    ENDPOINTING_SENSITIVITY_UNSPECIFIED = 0

    # Standard sensitivity, no optimization for latency.
    ENDPOINTING_SENSITIVITY_STANDARD = 1

    # Super short sensitivity, optimized for super short utterances like single
    # words ("Yes", "No", "Hello", etc.) or a single phrase, command or short
    # query (e.g. "check balance", "five dollars", "call Mom").
    ENDPOINTING_SENSITIVITY_SUPERSHORT = 2

    # Short sensitivity, optimized for short utterances like single sentences.
    # (e.g. "Remind me to call the dentist tomorrow morning at nine",
    # "Navigate to the nearest coffee shop that is currently open")
    ENDPOINTING_SENSITIVITY_SHORT = 3
  end
end

#endpointing_sensitivity::Google::Cloud::Speech::V2::StreamingRecognitionFeatures::EndpointingSensitivity

Returns Optional. Endpointing sensitivity for this stream.

Returns:



944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 944

class StreamingRecognitionFeatures
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Events that a timeout can be set on for voice activity.
  # @!attribute [rw] speech_start_timeout
  #   @return [::Google::Protobuf::Duration]
  #     Duration to timeout the stream if no speech begins. If this is set and
  #     no speech is detected in this duration at the start of the stream, the
  #     server will close the stream.
  # @!attribute [rw] speech_end_timeout
  #   @return [::Google::Protobuf::Duration]
  #     Duration to timeout the stream after speech ends. If this is set and no
  #     speech is detected in this duration after speech was detected, the server
  #     will close the stream.
  class VoiceActivityTimeout
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Endpointing sensitivity is intended for applications that want to minimize
  # result latency, possibly at the expense of quality. Some utterances may be
  # broken up into multiple fragments.
  module EndpointingSensitivity
    # If no value is specified, the values for
    # ENDPOINTING_SENSITIVITY_STANDARD will be used.
    ENDPOINTING_SENSITIVITY_UNSPECIFIED = 0

    # Standard sensitivity, no optimization for latency.
    ENDPOINTING_SENSITIVITY_STANDARD = 1

    # Super short sensitivity, optimized for super short utterances like single
    # words ("Yes", "No", "Hello", etc.) or a single phrase, command or short
    # query (e.g. "check balance", "five dollars", "call Mom").
    ENDPOINTING_SENSITIVITY_SUPERSHORT = 2

    # Short sensitivity, optimized for short utterances like single sentences.
    # (e.g. "Remind me to call the dentist tomorrow morning at nine",
    # "Navigate to the nearest coffee shop that is currently open")
    ENDPOINTING_SENSITIVITY_SHORT = 3
  end
end

#interim_results::Boolean

Returns Whether or not to stream interim results to the client. If set to true, interim results will be streamed to the client. Otherwise, only the final response will be streamed back.

Returns:

  • (::Boolean)

    Whether or not to stream interim results to the client. If set to true, interim results will be streamed to the client. Otherwise, only the final response will be streamed back.



944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 944

class StreamingRecognitionFeatures
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Events that a timeout can be set on for voice activity.
  # @!attribute [rw] speech_start_timeout
  #   @return [::Google::Protobuf::Duration]
  #     Duration to timeout the stream if no speech begins. If this is set and
  #     no speech is detected in this duration at the start of the stream, the
  #     server will close the stream.
  # @!attribute [rw] speech_end_timeout
  #   @return [::Google::Protobuf::Duration]
  #     Duration to timeout the stream after speech ends. If this is set and no
  #     speech is detected in this duration after speech was detected, the server
  #     will close the stream.
  class VoiceActivityTimeout
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Endpointing sensitivity is intended for applications that want to minimize
  # result latency, possibly at the expense of quality. Some utterances may be
  # broken up into multiple fragments.
  module EndpointingSensitivity
    # If no value is specified, the values for
    # ENDPOINTING_SENSITIVITY_STANDARD will be used.
    ENDPOINTING_SENSITIVITY_UNSPECIFIED = 0

    # Standard sensitivity, no optimization for latency.
    ENDPOINTING_SENSITIVITY_STANDARD = 1

    # Super short sensitivity, optimized for super short utterances like single
    # words ("Yes", "No", "Hello", etc.) or a single phrase, command or short
    # query (e.g. "check balance", "five dollars", "call Mom").
    ENDPOINTING_SENSITIVITY_SUPERSHORT = 2

    # Short sensitivity, optimized for short utterances like single sentences.
    # (e.g. "Remind me to call the dentist tomorrow morning at nine",
    # "Navigate to the nearest coffee shop that is currently open")
    ENDPOINTING_SENSITIVITY_SHORT = 3
  end
end

#voice_activity_timeout::Google::Cloud::Speech::V2::StreamingRecognitionFeatures::VoiceActivityTimeout

Returns If set, the server will automatically close the stream after the specified duration has elapsed after the last VOICE_ACTIVITY speech event has been sent. The field voice_activity_events must also be set to true.

Returns:



944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 944

class StreamingRecognitionFeatures
  include ::Google::Protobuf::MessageExts
  extend ::Google::Protobuf::MessageExts::ClassMethods

  # Events that a timeout can be set on for voice activity.
  # @!attribute [rw] speech_start_timeout
  #   @return [::Google::Protobuf::Duration]
  #     Duration to timeout the stream if no speech begins. If this is set and
  #     no speech is detected in this duration at the start of the stream, the
  #     server will close the stream.
  # @!attribute [rw] speech_end_timeout
  #   @return [::Google::Protobuf::Duration]
  #     Duration to timeout the stream after speech ends. If this is set and no
  #     speech is detected in this duration after speech was detected, the server
  #     will close the stream.
  class VoiceActivityTimeout
    include ::Google::Protobuf::MessageExts
    extend ::Google::Protobuf::MessageExts::ClassMethods
  end

  # Endpointing sensitivity is intended for applications that want to minimize
  # result latency, possibly at the expense of quality. Some utterances may be
  # broken up into multiple fragments.
  module EndpointingSensitivity
    # If no value is specified, the values for
    # ENDPOINTING_SENSITIVITY_STANDARD will be used.
    ENDPOINTING_SENSITIVITY_UNSPECIFIED = 0

    # Standard sensitivity, no optimization for latency.
    ENDPOINTING_SENSITIVITY_STANDARD = 1

    # Super short sensitivity, optimized for super short utterances like single
    # words ("Yes", "No", "Hello", etc.) or a single phrase, command or short
    # query (e.g. "check balance", "five dollars", "call Mom").
    ENDPOINTING_SENSITIVITY_SUPERSHORT = 2

    # Short sensitivity, optimized for short utterances like single sentences.
    # (e.g. "Remind me to call the dentist tomorrow morning at nine",
    # "Navigate to the nearest coffee shop that is currently open")
    ENDPOINTING_SENSITIVITY_SHORT = 3
  end
end