Struct google_api_proto::google::cloud::mediatranslation::v1alpha1::StreamingTranslateSpeechResponse
source · pub struct StreamingTranslateSpeechResponse {
pub error: Option<Status>,
pub result: Option<StreamingTranslateSpeechResult>,
pub speech_event_type: i32,
}
Expand description
A streaming speech translation response corresponding to a portion of the audio currently processed.
Fields§
§error: Option<Status>
Output only. If set, returns a [google.rpc.Status][google.rpc.Status] message that specifies the error for the operation.
result: Option<StreamingTranslateSpeechResult>
Output only. The translation result that is currently being processed (For text
translation, is_final
could be true
or false
.
For audio translation, we do not have is_final field, which means each
audio response is stable and will not get changed later. For
text_and_audio, we still have is_final
field in text translation, but we
only output corresponsding audio when is_final
is true.).
speech_event_type: i32
Output only. Indicates the type of speech event.
Implementations§
source§impl StreamingTranslateSpeechResponse
impl StreamingTranslateSpeechResponse
sourcepub fn speech_event_type(&self) -> SpeechEventType
pub fn speech_event_type(&self) -> SpeechEventType
Returns the enum value of speech_event_type
, or the default if the field is set to an invalid enum value.
sourcepub fn set_speech_event_type(&mut self, value: SpeechEventType)
pub fn set_speech_event_type(&mut self, value: SpeechEventType)
Sets speech_event_type
to the provided enum value.
Trait Implementations§
source§impl Clone for StreamingTranslateSpeechResponse
impl Clone for StreamingTranslateSpeechResponse
source§fn clone(&self) -> StreamingTranslateSpeechResponse
fn clone(&self) -> StreamingTranslateSpeechResponse
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Message for StreamingTranslateSpeechResponse
impl Message for StreamingTranslateSpeechResponse
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for StreamingTranslateSpeechResponse
impl PartialEq for StreamingTranslateSpeechResponse
source§fn eq(&self, other: &StreamingTranslateSpeechResponse) -> bool
fn eq(&self, other: &StreamingTranslateSpeechResponse) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for StreamingTranslateSpeechResponse
Auto Trait Implementations§
impl !Freeze for StreamingTranslateSpeechResponse
impl RefUnwindSafe for StreamingTranslateSpeechResponse
impl Send for StreamingTranslateSpeechResponse
impl Sync for StreamingTranslateSpeechResponse
impl Unpin for StreamingTranslateSpeechResponse
impl UnwindSafe for StreamingTranslateSpeechResponse
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request