Expand description
Audio format conversion and resampling utilities.
Provides sample rate conversion, format conversion, and audio processing.
Resampling uses the rubato crate (feature-gated behind “resample”).
Structs§
- Audio
Format - Audio format specification
Functions§
- concat_
audio - Concatenate multiple audio chunks with optional crossfade.
- f32_
to_ i16 - Convert f32 samples to i16 (with clamping)
- fade_in
- Apply a simple fade-in effect (linear amplitude ramp).
- fade_
out - Apply a simple fade-out effect (linear amplitude ramp).
- i16_
to_ f32 - Convert i16 samples to f32 (-1.0 to 1.0)
- mono_
to_ stereo - Convert mono to stereo (duplicate channel)
- normalize_
peak - Normalize audio to a target peak level (in dB, e.g., -1.0 dB).
- resample_
linear - Resample audio from one sample rate to another. Uses linear interpolation (always available, no external deps).
- rms_db
- Compute RMS level in dB.
- stereo_
to_ mono - Convert stereo to mono (average channels)
- trim_
silence - Trim silence from the beginning and end of audio.