pub struct AsrOptions {
pub language: Option<String>,
pub word_timestamps: bool,
pub diarize: bool,
pub translate: bool,
pub vad: bool,
pub vad_threshold: f32,
pub vad_chunk_secs: f32,
}Fields§
§language: Option<String>Force a language instead of auto-detecting.
word_timestamps: boolWord-level timestamps (WhisperX-style forced alignment).
diarize: boolSpeaker diarization (WhisperX-style).
translate: boolTranslate to English instead of transcribing.
vad: boolSegment on speech before transcribing, so silence never reaches the model.
On by default, for measured speed — not for quality.
- Audio with trailing silence: 2.2–4.2× faster, transcript byte-identical.
- Silent input: empty transcript, with no encoder pass at all.
- A live sliding window stops spending five encoder passes to produce nothing.
Corpus WER does move with this on (test-clean 7.99 → 6.79,
test-other 16.79 → 16.43), and that is not a quality improvement —
do not cite it as one. Per-clip decomposition over 400 clips gives 38
improved and 38 worsened, a sign test of z = 0.00. VAD shifts where
speech sits inside Whisper’s fixed 30 s context by ~0.2 s, which
re-rolls the decode on about a fifth of clips, half each way; the
aggregate moved because WER is dominated by a few high-delta clips.
Full descent: docs/whys/vad-quality.md.
Set false for the unsegmented fixed-30 s-grid behaviour.
vad_threshold: f32Speech threshold, 0..1, higher being stricter. Only read when
Self::vad is set.
vad_chunk_secs: f32Pack speech regions into windows of at most this many seconds.
Trait Implementations§
Source§impl Clone for AsrOptions
impl Clone for AsrOptions
Source§fn clone(&self) -> AsrOptions
fn clone(&self) -> AsrOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AsrOptions
impl Debug for AsrOptions
Auto Trait Implementations§
impl Freeze for AsrOptions
impl RefUnwindSafe for AsrOptions
impl Send for AsrOptions
impl Sync for AsrOptions
impl Unpin for AsrOptions
impl UnsafeUnpin for AsrOptions
impl UnwindSafe for AsrOptions
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<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,
impl<T> ErasedDestructor for Twhere
T: 'static,
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>
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>
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