pub struct ListenConfig {
pub language: Option<LanguageCode>,
pub interim_results: bool,
pub continuous: bool,
pub max_duration: u32,
pub max_alternatives: Option<u32>,
pub on_device: bool,
}Expand description
Configuration for starting speech recognition
Fields§
§language: Option<LanguageCode>Language code for recognition (e.g., “en-US”, “pt-BR”) If not specified, uses device default language
interim_results: boolWhether to return interim (partial) results
continuous: boolWhether to continue listening after getting a result If false, stops after first final result
max_duration: u32Maximum duration to listen in milliseconds (0 = no limit)
max_alternatives: Option<u32>Maximum number of alternative transcriptions
on_device: boolUse on-device recognition only (iOS 13+, no network required) When true, recognition works offline but may be less accurate
Trait Implementations§
Source§impl Clone for ListenConfig
impl Clone for ListenConfig
Source§fn clone(&self) -> ListenConfig
fn clone(&self) -> ListenConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ListenConfig
impl Debug for ListenConfig
Source§impl Default for ListenConfig
impl Default for ListenConfig
Source§fn default() -> ListenConfig
fn default() -> ListenConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ListenConfig
impl<'de> Deserialize<'de> for ListenConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ListenConfig
impl RefUnwindSafe for ListenConfig
impl Send for ListenConfig
impl Sync for ListenConfig
impl Unpin for ListenConfig
impl UnsafeUnpin for ListenConfig
impl UnwindSafe for ListenConfig
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
Mutably borrows from an owned value. Read more