Struct google_cognitive_apis::api::grpc::google::cloud::dialogflow::v2::StreamingDetectIntentResponse
source · [−]pub struct StreamingDetectIntentResponse {
pub response_id: String,
pub recognition_result: Option<StreamingRecognitionResult>,
pub query_result: Option<QueryResult>,
pub webhook_status: Option<Status>,
pub output_audio: Vec<u8>,
pub output_audio_config: Option<OutputAudioConfig>,
}
Expand description
The top-level message returned from the
StreamingDetectIntent
method.
Multiple response messages can be returned in order:
-
If the input was set to streaming audio, the first one or more messages contain
recognition_result
. Eachrecognition_result
represents a more complete transcript of what the user said. The lastrecognition_result
hasis_final
set totrue
. -
The next message contains
response_id
,query_result
and optionallywebhook_status
if a WebHook was called.
Fields
response_id: String
The unique identifier of the response. It can be used to locate a response in the training example set or for reporting issues.
recognition_result: Option<StreamingRecognitionResult>
The result of speech recognition.
query_result: Option<QueryResult>
The result of the conversational query or event processing.
webhook_status: Option<Status>
Specifies the status of the webhook request.
output_audio: Vec<u8>
The audio data bytes encoded as specified in the request.
Note: The output audio is generated based on the values of default platform
text responses found in the query_result.fulfillment_messages
field. If
multiple default text responses exist, they will be concatenated when
generating audio. If no default platform text responses exist, the
generated audio content will be empty.
In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content.
output_audio_config: Option<OutputAudioConfig>
The config used by the speech synthesizer to generate the output audio.
Trait Implementations
sourceimpl Clone for StreamingDetectIntentResponse
impl Clone for StreamingDetectIntentResponse
sourcefn clone(&self) -> StreamingDetectIntentResponse
fn clone(&self) -> StreamingDetectIntentResponse
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for StreamingDetectIntentResponse
impl Debug for StreamingDetectIntentResponse
sourceimpl Message for StreamingDetectIntentResponse
impl Message for StreamingDetectIntentResponse
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
sourcefn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
Encodes the message to a buffer. Read more
sourcefn encode_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Encodes the message to a newly allocated buffer.
sourcefn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError> where
B: BufMut,
Encodes the message with a length-delimiter to a buffer. Read more
sourcefn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
fn encode_length_delimited_to_vec(&self) -> Vec<u8, Global>ⓘNotable traits for Vec<u8, A>impl<A> Write for Vec<u8, A> where
A: Allocator,
A: Allocator,
Encodes the message with a length-delimiter to a newly allocated buffer.
sourcefn decode<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
fn decode<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
Decodes an instance of the message from a buffer. Read more
sourcefn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
B: Buf,
Self: Default,
Decodes a length-delimited instance of the message from the buffer.
sourcefn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
Decodes an instance of the message from a buffer, and merges it into self
. Read more
sourcefn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError> where
B: Buf,
Decodes a length-delimited instance of the message from buffer, and
merges it into self
. Read more
sourceimpl PartialEq<StreamingDetectIntentResponse> for StreamingDetectIntentResponse
impl PartialEq<StreamingDetectIntentResponse> for StreamingDetectIntentResponse
sourcefn eq(&self, other: &StreamingDetectIntentResponse) -> bool
fn eq(&self, other: &StreamingDetectIntentResponse) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
impl StructuralPartialEq for StreamingDetectIntentResponse
Auto Trait Implementations
impl RefUnwindSafe for StreamingDetectIntentResponse
impl Send for StreamingDetectIntentResponse
impl Sync for StreamingDetectIntentResponse
impl Unpin for StreamingDetectIntentResponse
impl UnwindSafe for StreamingDetectIntentResponse
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcefn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message T
in a tonic::Request