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
//! Media processing for Weirdnet clients and nodes, shared by the apps that send audio and video to
//! models and get speech back.
//!
//! - [`probe`]: WAV headers read in pure Rust; any other container through `ffprobe`.
//! - [`pcm`]: decode WAV, mix to mono, resample (16 kHz for transcribers), crossfade, concatenate
//! and write WAV.
//! - [`vad`]: silence-aware cut points for long clips (30 ms RMS frames).
//! - [`transcribe`]: the long-audio transcription plan, the prompt carried between pieces, and the
//! re-alignment of each piece's segments onto the whole clip.
//! - [`speak`]: [`speak::TextPlan`], the long-text speech plan (paragraph, sentence, clause; script
//! turns kept whole), and the joins between the synthesized pieces.
//! - [`subtitles`]: SRT and WebVTT.
//! - [`ffmpeg`]: the hardened `ffmpeg` / `ffprobe` [`ffmpeg::Runner`] (protocol and demuxer
//! allowlists, no URLs, no shell, time, memory and output limits) behind the [`ffmpeg::Exec`]
//! trait, with [`ffmpeg::FakeRunner`] for tests without ffmpeg.
//! - [`audio`]: normalization to 16 kHz mono WAV, soundtrack extraction and encoding through the
//! runner.
//! - [`waveform`]: an immutable `f32` [`waveform::Waveform`] (shared samples) with gain, fades, normalise, pan, mix and WAV
//! read and write at 8 to 32 bits, converting to and from [`pcm::Pcm`] without loss.
//! - [`video`]: video probing, frame planning (uniform, scene, hybrid, keyframes, intervals),
//! frame and thumbnail extraction, and clips, behind [`video::FrameSource`] with
//! [`video::FakeSource`] for tests.
//!
//! Nothing here fetches anything: inputs are files the caller already chose or bytes it holds.
//! There are no defaults that stand in for a model's limits; plans take the limits the model
//! reports and refuse, naming the missing setting, when they are absent.
pub use ;