pub struct AsrConfig {
pub language: Option<String>,
pub beam_size: usize,
pub temperature: f32,
pub word_timestamps: bool,
pub max_segment_length: f32,
pub suppress_blank: bool,
pub condition_on_previous: bool,
}Expand description
ASR configuration for transcription sessions
Fields§
§language: Option<String>Language code (ISO 639-1) or None for auto-detection
beam_size: usizeBeam search width (1 = greedy, 5 = default)
temperature: f32Temperature for sampling (0.0 = deterministic)
word_timestamps: boolEnable word-level timestamps
max_segment_length: f32Maximum segment length in seconds
suppress_blank: boolSuppress blank tokens at start
condition_on_previous: boolCondition on previous text for context
Implementations§
Source§impl AsrConfig
impl AsrConfig
Sourcepub fn with_language(self, lang: impl Into<String>) -> AsrConfig
pub fn with_language(self, lang: impl Into<String>) -> AsrConfig
Create config for a specific language
Sourcepub fn with_word_timestamps(self) -> AsrConfig
pub fn with_word_timestamps(self) -> AsrConfig
Enable word-level timestamps
Sourcepub fn with_beam_size(self, size: usize) -> AsrConfig
pub fn with_beam_size(self, size: usize) -> AsrConfig
Set beam size (1 for greedy decoding)
Sourcepub fn validate(&self) -> Result<(), SpeechError>
pub fn validate(&self) -> Result<(), SpeechError>
Validate configuration
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AsrConfig
impl RefUnwindSafe for AsrConfig
impl Send for AsrConfig
impl Sync for AsrConfig
impl Unpin for AsrConfig
impl UnsafeUnpin for AsrConfig
impl UnwindSafe for AsrConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more