Expand description
Sample-level audio DSP, file codecs, voices, and product pipelines.
Placement rule: code that operates on Tensor<R> with backend kernels
belongs in boostr::model::audio. Code that operates on Vec<f32>
samples, files, directories, voices, or text pipelines belongs here.
Always compiled: RIFF/WAVE in and out (wav), the polyphase
resamplers (general, ffmpeg-exact and SciPy-exact), the single-sound
metrics and the sound_review built on them, the reference-take
enhance chain, pitch, quality, two-signal spectral
distance, the atempo-compatible tempo stretch, ASR eval
metrics, the signal and summary halves of the tts_eval quality gate,
and the Lang tag a voice carries. Feature gates add the
compressed-audio decoders, the clap audio-text scorer, the
misaki G2P backend (g2p), the spaCy en_core_web_sm tokenizer and
tagger, the tts surface, the kokoro and voxcpm
engines, the whisper bundle, the vad segmenter, corpus
preparation, and the pace, intelligibility and timbre legs of
tts_eval.
sound_review implements the sound review of the motion-video skill
(https://github.com/farhan-syah/motion-video-skill). Docs here call it
“the motion-video skill” or “the skill”.
Re-exports§
pub use error::Error;pub use error::Result;pub use corpus::CorpusOptions;pub use corpus::MAX_UTTERANCE_SECS;pub use corpus::PRETRAINED_TOKENIZER_NAMES;pub use corpus::SpeechCorpusBuilder;pub use corpus::TextTokenizer;pub use corpus::Utterance;pub use corpus::check_max_speech_duration;pub use corpus::pack_utterances;pub use corpus::pack_utterances_with_layout;pub use decode::decode_audio;pub use decode::decode_audio_file_mono_at;pub use decode::decode_audio_like_ffmpeg;pub use decode::decode_audio_mono_at;pub use decode::extension_hint;pub use eval::ErrorRate;pub use eval::align;pub use eval::align;pub use eval::by_group;pub use eval::canonical_character_error_rate;pub use eval::canonical_word_error_rate;pub use eval::canonicalize;pub use eval::character_error_rate;pub use eval::grand_total;pub use eval::normalize;pub use eval::normalize;pub use eval::total;pub use eval::word_error_rate;pub use ffmpeg::ffmpeg_program;pub use ffmpeg::ffprobe_program;pub use lang::Lang;pub use lang::LangTag;pub use pitch::PitchOptions;pub use pitch::PitchTrack;pub use pitch::estimate_pitch;pub use quality::TakeQuality;pub use quality::measure_quality;pub use resample::DEFAULT_TAPS_PER_PHASE;pub use resample::MAX_FILTER_TAPS;pub use resample::PolySample;pub use resample::ffmpeg_default_layout;pub use resample::ffmpeg_resampled_len;pub use resample::librosa_output_len;pub use resample::resample;pub use resample::resample_interleaved_like_ffmpeg;pub use resample::resample_like_ffmpeg;pub use resample::resample_like_librosa;pub use resample::resample_poly;pub use resample::resample_with_taps;pub use resample::to_mono_at_rate;pub use resample::to_mono_like_ffmpeg;pub use spectral::SpectralDistance;pub use spectral::multi_resolution_stft_distance;pub use spectral::snr_db;pub use stretch::MAX_TEMPO;pub use stretch::MIN_TEMPO;pub use stretch::PcmSample;pub use stretch::atempo;pub use stretch::atempo_interleaved;pub use stretch::atempo_pcm16;pub use tts::KOKORO_VOICES;pub use tts::SynthesizeOptions;pub use tts::TtsBundle;pub use tts::TtsEngine;pub use tts::TtsError;pub use tts::Voice;pub use tts::default_kokoro_voices;pub use tts_eval::F0Stats;pub use tts_eval::TimbreProxy;pub use tts_eval::TimbreScorer;pub use tts_eval::timbre_proxy;pub use tts_eval::Intelligibility;pub use tts_eval::IntelligibilityClient;pub use tts_eval::IntelligibilityScorer;pub use tts_eval::MetricStat;pub use tts_eval::RowScore;pub use tts_eval::SignalStats;pub use tts_eval::Summary;pub use tts_eval::Thresholds;pub use tts_eval::UNLABELLED_AXIS;pub use tts_eval::signal_stats;pub use tts_eval::violations;pub use tts_eval::Pace;pub use tts_eval::pace;pub use tts_eval::pace;pub use tts_eval::pace_from_segments;pub use vad::SpeechSegment;pub use vad::VadSegmentOptions;pub use vad::segments_from_probabilities;pub use vad::speech_timestamps;pub use wav::WavData;pub use wav::WavF64;pub use wav::decode_wav;pub use wav::decode_wav_f64;pub use wav::encode_f32_raw;pub use wav::encode_pcm16_raw;pub use wav::encode_wav_f32;pub use wav::encode_wav_pcm16;pub use wav::encode_wav_pcm16_values;pub use wav::to_mono;pub use wav::wav_stream_header_f32;pub use wav::wav_stream_header_pcm16;pub use whisper::TranscribeOptions;pub use whisper::Transcription;pub use whisper::WhisperBundle;pub use whisper::WhisperGenerationConfig;pub use whisper::WordTiming;
Modules§
- clap
- CLAP scoring of audio against text: a checkpoint directory loaded into
boostr’s
ClapModel, its tokenizer, and the cosine scores between clips and texts. - corpus
- Speech-corpus preparation: a decoded recording in, a packed speech-LM token stream out.
- decode
- Compressed-audio decoding via symphonia: WAV, FLAC, MP3, OGG/Vorbis, AAC and ALAC in MP4/M4A/MOV, and Opus or Vorbis in WebM/MKV/OGG, video files’ audio tracks included. Each file decodes as ffmpeg decodes it: encoder priming and padding trimmed.
- enhance
- Turn a raw recording into a usable reference.
- error
- voxr error types.
- eval
- Error-rate metrics for ASR output and for the intelligibility leg of TTS eval.
- ffmpeg
- The ffmpeg programs voxr’s ffmpeg-matching code is checked against:
$FFMPEGand$FFPROBE, elseffmpegandffprobeonPATH. - g2p
- Grapheme-to-phoneme (G2P) conversion.
- kokoro
- Kokoro synthesis pipeline: G2P, voice-pack lookup on disk, and the
KokoroEnginethat drives boostr’sKokoroModelV2. - lang
Lang: the language tag acrate::tts::Voicecarries.- metrics
- Single-signal measures of a finished sound, each a port of the NumPy and SciPy computation the motion-video skill’s sound review runs: sharpness, the share of energy above 8 kHz, the tail against the loudest 50 ms, and the 4x oversampled true peak.
- pitch
- Fundamental-frequency (F0) estimation with YIN.
- quality
- Take-quality metrics for recorded/decoded speech: peak, RMS, noise floor, SNR.
- resample
- Sample-rate conversion for
f32audio. - sound_
review - The motion-video skill’s developer sound review (
sound-review.py): numeric limits on every rendered sound, and recognizability of the base variants against theirsaystexts by an audio-text model. - spectral
- Multi-resolution spectral distance and two-signal SNR, for comparing a
decoded/rendered take against its reference (e.g. an
AudioVAEdecoded at F16 vs the same latent decoded at F32). - stretch
- Tempo change without a pitch change, by waveform-similarity overlap-add.
- tts
- Engine-agnostic text-to-speech surface: the
TtsEnginetrait a model implements and theTtsBundlethat owns one plus its voice catalog. - tts_
eval - TTS quality gate: numbers for every rendered clip.
- vad
- Segmentation: speech probabilities in, utterance boundaries out.
- voxcpm
- VoxCPM2 voice-cloning pipeline: reference recordings decoded from a voices
directory or encoded per request, text tokenized through splintr, and the
VoxCpm2Enginethat drives boostr’sVoxCpm2Model. Weights-source selection (VoxCpm2Weights) stays with the model in boostr. - wav
- RIFF/WAVE: the one container this crate reads and writes without the
decodefeature.decodeparses PCM and IEEE-float files through hound,decode_f64reads them tof64as libsndfile does,encodewrites them,streamwrites the unknown-length header a streamed response starts with,formatholds the format tags and canonical header layout all sides agree on, andlayoutparses thefmtchunk and the channel layout it names. - whisper
- Whisper as a product pipeline: the checkpoint’s weights from boostr plus the tokenizer and decoding constraints that make it transcribe.