Enum google_api_proto::google::cloud::speech::v1::streaming_recognize_response::SpeechEventType
source · #[repr(i32)]pub enum SpeechEventType {
SpeechEventUnspecified = 0,
EndOfSingleUtterance = 1,
SpeechActivityBegin = 2,
SpeechActivityEnd = 3,
SpeechActivityTimeout = 4,
}
Expand description
Indicates the type of speech event.
Variants§
SpeechEventUnspecified = 0
No speech event specified.
EndOfSingleUtterance = 1
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). The client should stop sending additional audio
data, half-close the gRPC connection, and wait for any additional results
until the server closes the gRPC connection. This event is only sent if
single_utterance
was set to true
, and is not used otherwise.
SpeechActivityBegin = 2
This event indicates that the server has detected the beginning of human
voice activity in the stream. This event can be returned multiple times
if speech starts and stops repeatedly throughout the stream. This event
is only sent if voice_activity_events
is set to true.
SpeechActivityEnd = 3
This event indicates that the server has detected the end of human voice
activity in the stream. This event can be returned multiple times if
speech starts and stops repeatedly throughout the stream. This event is
only sent if voice_activity_events
is set to true.
SpeechActivityTimeout = 4
This event indicates that the user-set timeout for speech activity begin or end has exceeded. Upon receiving this event, the client is expected to send a half close. Further audio will not be processed.
Implementations§
source§impl SpeechEventType
impl SpeechEventType
sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
source§impl Clone for SpeechEventType
impl Clone for SpeechEventType
source§fn clone(&self) -> SpeechEventType
fn clone(&self) -> SpeechEventType
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for SpeechEventType
impl Debug for SpeechEventType
source§impl Default for SpeechEventType
impl Default for SpeechEventType
source§fn default() -> SpeechEventType
fn default() -> SpeechEventType
source§impl From<SpeechEventType> for i32
impl From<SpeechEventType> for i32
source§fn from(value: SpeechEventType) -> i32
fn from(value: SpeechEventType) -> i32
source§impl Hash for SpeechEventType
impl Hash for SpeechEventType
source§impl Ord for SpeechEventType
impl Ord for SpeechEventType
source§fn cmp(&self, other: &SpeechEventType) -> Ordering
fn cmp(&self, other: &SpeechEventType) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for SpeechEventType
impl PartialEq for SpeechEventType
source§fn eq(&self, other: &SpeechEventType) -> bool
fn eq(&self, other: &SpeechEventType) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for SpeechEventType
impl PartialOrd for SpeechEventType
source§fn partial_cmp(&self, other: &SpeechEventType) -> Option<Ordering>
fn partial_cmp(&self, other: &SpeechEventType) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<i32> for SpeechEventType
impl TryFrom<i32> for SpeechEventType
§type Error = DecodeError
type Error = DecodeError
source§fn try_from(value: i32) -> Result<SpeechEventType, DecodeError>
fn try_from(value: i32) -> Result<SpeechEventType, DecodeError>
impl Copy for SpeechEventType
impl Eq for SpeechEventType
impl StructuralPartialEq for SpeechEventType
Auto Trait Implementations§
impl Freeze for SpeechEventType
impl RefUnwindSafe for SpeechEventType
impl Send for SpeechEventType
impl Sync for SpeechEventType
impl Unpin for SpeechEventType
impl UnwindSafe for SpeechEventType
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§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