Skip to main content

Module resample

Module resample 

Source
Expand description

Resampling utilities for audio processing.

Provides functionality to resample audio data to target sample rates and formats, ensuring compatibility with the VAD processing pipeline. Audio resampling utilities using the rubato crate.

Provides i16 ↔ f32 conversion and synchronous resampling of mono PCM audio via rubato::Fft with the rubato::FixedSync::Input configuration. The rubato 2.0 API uses audioadapter-based buffers, so this module wraps the input slice with SequentialSlice and the output buffer with SequentialSliceOfVecs before delegating to Resampler::process_all_into_buffer.

Functions§

resample_to_target_rate
Resample i16 mono audio to the target sample rate (returns Vec<i16>).