Expand description
§speech-prep
Speech-focused audio preprocessing for Rust.
- Voice activity detection (dual-metric: energy + spectral flux)
- Multi-format decoding (WAV/MP3/FLAC/OGG/M4A/Opus → 16kHz mono PCM)
- Preprocessing (DC removal, high-pass filter, noise reduction, normalization)
- Speech-aligned chunking with overlap handling
- Quality assessment metrics
§Usage
use speech_prep::VadConfig;
let config = VadConfig::default();
assert!(config.base_threshold > 0.0);Re-exports§
pub use buffer::AudioBuffer;pub use buffer::AudioMetadata;pub use chunker::ChunkBoundary;pub use chunker::Chunker;pub use chunker::ChunkerConfig;pub use chunker::ProcessedChunk;pub use error::Error;pub use error::Result;pub use monitoring::VADStats;pub use pipeline::AudioPipelineCoordinator;pub use pipeline::ProcessingResult;pub use pipeline::StageLatencies;pub use preprocessing::DcHighPassFilter;pub use preprocessing::HighpassOrder;pub use preprocessing::NoiseReducer;pub use preprocessing::NoiseReductionConfig;pub use preprocessing::PreprocessingConfig;pub use preprocessing::VadContext;pub use time::AudioDuration;pub use time::AudioInstant;pub use time::AudioTimestamp;pub use types::AudioChunk;pub use vad::NoopVadMetricsCollector;pub use vad::SpeechChunk;pub use vad::VadConfig;pub use vad::VadDetector;pub use vad::VadMetricsCollector;
Modules§
- buffer
- Audio buffer types for batch audio processing.
- chunker
- Audio chunking aligned to VAD segments.
- converter
- High-level audio format conversion pipeline.
- decoder
- Audio decoding, resampling, and channel mixing utilities.
- error
- Error types for speech-prep.
- format
- Audio format detection and metadata extraction for the audio pipeline.
- monitoring
- Lightweight counters and VAD statistics.
- pipeline
- End-to-end audio processing coordinator.
- preprocessing
- Audio preprocessing module for clean, analysis-ready audio.
- time
- Stream-relative time types for audio processing.
- types
- Core types for audio processing.
- vad
- Voice Activity Detection (VAD) with dual-metric analysis.