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
//! Streaming speech-to-text — incremental encoder + orchestration.
//!
//! Faithful port of
//! [`mlx-audio-swift/Sources/MLXAudioSTT/Streaming/`][swift-dir]:
//!
//! - [`crate::audio::stt::streaming::mel_spectrogram::IncrementalMelSpectrogram`] —
//! streaming mel-spec with overlap-save framing, mirrors
//! `IncrementalMelSpectrogram.swift`.
//! - [`crate::audio::stt::streaming::encoder::StreamingEncoderBackend`]
//! trait +
//! [`crate::audio::stt::streaming::encoder::StreamingEncoder`] window
//! accumulator — mirrors `StreamingEncoder.swift`.
//! - [`crate::audio::stt::streaming::session::StreamingInferenceSession`]
//! + [`crate::audio::stt::streaming::session::StreamingDecoderBackend`]
//! trait — orchestration, mirrors `StreamingInferenceSession.swift`.
//! - [`crate::audio::stt::streaming::types::DelayPreset`],
//! [`crate::audio::stt::streaming::types::StreamingConfig`],
//! [`crate::audio::stt::streaming::types::TranscriptionEvent`], and
//! [`crate::audio::stt::streaming::types::StreamingStats`] —
//! value-types, mirror `StreamingTypes.swift`.
//!
//! Async-stream → sync-batch shape:
//!
//! The Swift reference's
//! [`StreamingInferenceSession`][swift-session] yields
//! [`crate::audio::stt::streaming::types::TranscriptionEvent`] values
//! into an `AsyncStream<TranscriptionEvent>` and runs the decode pass
//! on a detached `Task`. mlxrs's port runs the decode pass synchronously
//! on the caller's thread and returns a `Vec<TranscriptionEvent>` from
//! each [`crate::audio::stt::streaming::session::StreamingInferenceSession::feed_audio`]
//! / [`crate::audio::stt::streaming::session::StreamingInferenceSession::stop`]
//! call instead. The event sequence is byte-identical; only the
//! delivery channel differs.
//!
//! [swift-session]: https://github.com/Blaizzy/mlx-audio-swift/blob/main/Sources/MLXAudioSTT/Streaming/StreamingInferenceSession.swift
//!
//! mlxrs ships **no** concrete encoder / decoder implementations:
//! per-architecture encoders / decoders implement the streaming traits
//! and pass themselves into the streaming session.
//!
//! [swift-dir]: https://github.com/Blaizzy/mlx-audio-swift/tree/main/Sources/MLXAudioSTT/Streaming
pub use ;
pub use IncrementalMelSpectrogram;
pub use ;
pub use ;