sherpa_rs_sys

Struct SherpaOnnxOnlineRecognizerConfig

Source
#[repr(C)]
pub struct SherpaOnnxOnlineRecognizerConfig {
Show 16 fields pub feat_config: SherpaOnnxFeatureConfig, pub model_config: SherpaOnnxOnlineModelConfig, pub decoding_method: *const c_char, pub max_active_paths: i32, pub enable_endpoint: i32, pub rule1_min_trailing_silence: f32, pub rule2_min_trailing_silence: f32, pub rule3_min_utterance_length: f32, pub hotwords_file: *const c_char, pub hotwords_score: f32, pub ctc_fst_decoder_config: SherpaOnnxOnlineCtcFstDecoderConfig, pub rule_fsts: *const c_char, pub rule_fars: *const c_char, pub blank_penalty: f32, pub hotwords_buf: *const c_char, pub hotwords_buf_size: i32,
}

Fields§

§feat_config: SherpaOnnxFeatureConfig§model_config: SherpaOnnxOnlineModelConfig§decoding_method: *const c_char

Possible values are: greedy_search, modified_beam_search

§max_active_paths: i32

Used only when decoding_method is modified_beam_search Example value: 4

§enable_endpoint: i32

0 to disable endpoint detection. A non-zero value to enable endpoint detection.

§rule1_min_trailing_silence: f32

An endpoint is detected if trailing silence in seconds is larger than this value even if nothing has been decoded. Used only when enable_endpoint is not 0.

§rule2_min_trailing_silence: f32

An endpoint is detected if trailing silence in seconds is larger than this value after something that is not blank has been decoded. Used only when enable_endpoint is not 0.

§rule3_min_utterance_length: f32

An endpoint is detected if the utterance in seconds is larger than this value. Used only when enable_endpoint is not 0.

§hotwords_file: *const c_char

Path to the hotwords.

§hotwords_score: f32

Bonus score for each token in hotwords.

§ctc_fst_decoder_config: SherpaOnnxOnlineCtcFstDecoderConfig§rule_fsts: *const c_char§rule_fars: *const c_char§blank_penalty: f32§hotwords_buf: *const c_char

if non-nullptr, loading the hotwords from the buffered string directly in

§hotwords_buf_size: i32

byte size excluding the tailing ‘\0’

Trait Implementations§

Source§

impl Clone for SherpaOnnxOnlineRecognizerConfig

Source§

fn clone(&self) -> SherpaOnnxOnlineRecognizerConfig

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SherpaOnnxOnlineRecognizerConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for SherpaOnnxOnlineRecognizerConfig

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.