Class: Google::Cloud::MediaTranslation::V1beta1::StreamingTranslateSpeechResponse
- Inherits:
-
Object
- Object
- Google::Cloud::MediaTranslation::V1beta1::StreamingTranslateSpeechResponse
- Extended by:
- Protobuf::MessageExts::ClassMethods
- Includes:
- Protobuf::MessageExts
- Defined in:
- proto_docs/google/cloud/mediatranslation/v1beta1/media_translation.rb
Overview
A streaming speech translation response corresponding to a portion of the audio currently processed.
Defined Under Namespace
Modules: SpeechEventType
Instance Attribute Summary collapse
-
#error ⇒ ::Google::Rpc::Status
readonly
Output only.
-
#result ⇒ ::Google::Cloud::MediaTranslation::V1beta1::StreamingTranslateSpeechResult
readonly
Output only.
-
#speech_event_type ⇒ ::Google::Cloud::MediaTranslation::V1beta1::StreamingTranslateSpeechResponse::SpeechEventType
readonly
Output only.
Instance Attribute Details
#error ⇒ ::Google::Rpc::Status (readonly)
Returns Output only. If set, returns a google.rpc.Status message that specifies the error for the operation.
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'proto_docs/google/cloud/mediatranslation/v1beta1/media_translation.rb', line 176 class StreamingTranslateSpeechResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Indicates the type of speech event. module SpeechEventType # No speech event specified. SPEECH_EVENT_TYPE_UNSPECIFIED = 0 # This event indicates that the server has detected the end of the user's # speech utterance and expects no additional speech. Therefore, the server # will not process additional audio (although it may subsequently return # additional results). When the client receives 'END_OF_SINGLE_UTTERANCE' # event, the client should stop sending the requests. However, clients # should keep receiving remaining responses until the stream is terminated. # To construct the complete sentence in a streaming way, one should # override (if 'is_final' of previous response is false), or append (if # 'is_final' of previous response is true). This event is only sent if # `single_utterance` was set to `true`, and is not used otherwise. END_OF_SINGLE_UTTERANCE = 1 end end |
#result ⇒ ::Google::Cloud::MediaTranslation::V1beta1::StreamingTranslateSpeechResult (readonly)
Returns Output only. The translation result that is currently being processed (is_final could be true or false).
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'proto_docs/google/cloud/mediatranslation/v1beta1/media_translation.rb', line 176 class StreamingTranslateSpeechResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Indicates the type of speech event. module SpeechEventType # No speech event specified. SPEECH_EVENT_TYPE_UNSPECIFIED = 0 # This event indicates that the server has detected the end of the user's # speech utterance and expects no additional speech. Therefore, the server # will not process additional audio (although it may subsequently return # additional results). When the client receives 'END_OF_SINGLE_UTTERANCE' # event, the client should stop sending the requests. However, clients # should keep receiving remaining responses until the stream is terminated. # To construct the complete sentence in a streaming way, one should # override (if 'is_final' of previous response is false), or append (if # 'is_final' of previous response is true). This event is only sent if # `single_utterance` was set to `true`, and is not used otherwise. END_OF_SINGLE_UTTERANCE = 1 end end |
#speech_event_type ⇒ ::Google::Cloud::MediaTranslation::V1beta1::StreamingTranslateSpeechResponse::SpeechEventType (readonly)
Returns Output only. Indicates the type of speech event.
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 |
# File 'proto_docs/google/cloud/mediatranslation/v1beta1/media_translation.rb', line 176 class StreamingTranslateSpeechResponse include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # Indicates the type of speech event. module SpeechEventType # No speech event specified. SPEECH_EVENT_TYPE_UNSPECIFIED = 0 # This event indicates that the server has detected the end of the user's # speech utterance and expects no additional speech. Therefore, the server # will not process additional audio (although it may subsequently return # additional results). When the client receives 'END_OF_SINGLE_UTTERANCE' # event, the client should stop sending the requests. However, clients # should keep receiving remaining responses until the stream is terminated. # To construct the complete sentence in a streaming way, one should # override (if 'is_final' of previous response is false), or append (if # 'is_final' of previous response is true). This event is only sent if # `single_utterance` was set to `true`, and is not used otherwise. END_OF_SINGLE_UTTERANCE = 1 end end |