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

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.



786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 786

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
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.



786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 786

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
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:



786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
# File 'proto_docs/google/cloud/speech/v2/cloud_speech.rb', line 786

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
end