weirdnet-media 0.2.0

Weirdnet media processing for clients and nodes: WAV probing and PCM in pure Rust, 16 kHz resampling, silence-aware chunking, long-audio transcription plans, long-text speech plans, SRT/VTT, video frame planning, and a hardened ffmpeg runner with a test fake.
Documentation
//! 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 mod audio;
pub mod error;
pub mod ffmpeg;
pub mod pcm;
pub mod probe;
pub mod speak;
pub mod subtitles;
pub mod transcribe;
pub mod vad;
pub mod video;
pub mod waveform;

pub use error::{MediaError, Result};