Skip to main content

voxr_narrate/
lib.rs

1//! Narration scripts: phrases and chunks a voice speaks, tags, subtitle and
2//! timed script files, the written script, numbers read back from words and
3//! digits, the check of a spoken take against its script, its glitches, and
4//! the polish of its voice. Also a spoken take read into timed words, and
5//! the take loop's cache keys, file names and take-record files, and its
6//! pick of each part's best take through a speech engine and a judge, the
7//! designed or prepared voice every take clones, a whole VoxCPM2 run from
8//! script to voiceover, the per-phrase run of every other engine, a timed
9//! script's lines placed at their times, the spoken track time-stretched to
10//! a pace, and the skill's WAV files. Also, behind features, the real
11//! engines behind the take loop's seams: Kokoro, VITS and VoxCPM2 as speech
12//! engines, Whisper as the hearing, and the runs a caller hands loaded
13//! models to. Also the speak and transcribe commands around them: every
14//! printed line, file and exit code, and the video manifest's narration.
15//!
16//! The crate implements the speak and transcribe contract of the
17//! motion-video skill (<https://github.com/farhan-syah/motion-video-skill>).
18//! "The skill" in these docs means it.
19
20mod error;
21mod js;
22mod js_math;
23mod pattern;
24
25#[cfg(any(
26    feature = "whisper",
27    feature = "kokoro",
28    feature = "vits",
29    feature = "voxcpm"
30))]
31pub mod adapters;
32pub mod check;
33pub mod command;
34pub mod glitch;
35pub mod polish;
36pub mod take;
37pub mod text;
38pub mod transcript;
39pub mod wav;
40
41#[cfg(any(
42    feature = "whisper",
43    feature = "kokoro",
44    feature = "vits",
45    feature = "voxcpm"
46))]
47pub use adapters::*;
48pub use check::*;
49pub use command::*;
50pub use error::{Error, Result};
51pub use glitch::*;
52pub use polish::*;
53pub use take::*;
54pub use text::*;
55pub use transcript::*;
56pub use wav::{
57    f32_wav, pcm16_round_trip, pcm16_wav, pcm16_wav_raw, probed_duration, read_wav, read_wav_file,
58};