1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
//! # ASR stream driving: the parts that do not depend on the model
//!
//! A stream driver turns audio, written in pieces as it arrives, into timed
//! transcript events. Everything about that which does not depend on the
//! model lives here; a model plugs in as an [`AsrEngine`].
//!
//! - [`AsrStreamDriver`] and [`AsrStreamContext`]: the shared, immutable half
//! of a transcription and one stream in progress. The context buffers the
//! engine's features, runs the voice-activity gate, skips silence, decides
//! when to decode, commits and drafts, and places what it emits on the
//! stream's clock; [`AsrStreamDriver::advance_ready`] batches the decodes of
//! many streams through one engine.
//! - [`AsrEngine`]: what a model gives the core: its streaming features
//! ([`StreamingFeatures`]; [`LogMelFeatures`] streams the log-mels the
//! Whisper family reads), the decode of a window ([`DecodeRequest`] to
//! [`WindowDecode`]), its text, and any per-stream carry.
//! - [`TranscriptSegment`] and [`TranscriptEvent`]: what a driver emits, a
//! committed segment or a draft one.
//! - [`EmissionPolicy`]: when a driver decodes ([`DecodeTriggers`]) and what it
//! commits ([`CommitRule`]), with presets for the three deployments (offline,
//! conservative real time, drafting real time).
//! - [`StreamClock`]: a stream's sample index to media time.
//! - [`VoiceActivityModel`] and [`VoiceActivityFilter`]: per-chunk speech
//! probabilities, and the gate that turns them into [`SpeechRegion`]s.
//! [`SileroVad`](crate::kits::speech::vad::silero_vad::SileroVad) is a model.
//! - Cutting a full window: an engine that times its words places the cut
//! between two [`WordSpan`]s ([`pause_cut`]) and makes each a segment
//! ([`word_segments`]); one that cannot cuts at the window's quietest stretch
//! before decoding it ([`quiet_cut`]).
//! - Speakers: with a diarizer attached
//! ([`with_speakers`](AsrStreamDriver::with_speakers), any
//! [`SpeakerActivityModel`](crate::kits::speech::diarization::SpeakerActivityModel)),
//! every segment is attributed to a speaker ([`SpeakerLabel`]) by a
//! [`SpeakerAttribution`] rule: [`MeanActivity`], `NeMo`'s, or
//! [`TurnOverlap`]. An engine that decodes windows whole can cut them at a
//! change of speaker first ([`SpeakerCutConfig::cut`]).
//! - [`LevelPolicy`] and [`LevelStatistic`]: what a window's features are
//! scaled against, the window's own frames or everything the stream has seen,
//! summarized as the model needs ([`MaxLevel`], [`MomentsLevel`]).
//!
//! [`support`] holds the internals underneath; nothing in it is part of the
//! API.
//!
//! [`whisper::driver`](crate::kits::speech::asr::whisper::driver) is a driver
//! built on these parts.
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;