rubato-resample

Resample audio streams in Rust with configurable quality and latency.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/Nackalalalong/voicebot-rs --skill rubato-resample
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rubato-resample
Source: https://github.com/Nackalalalong/voicebot-rs/tree/main/skills/robuto
Command: npx skills add https://github.com/Nackalalalong/voicebot-rs --skill rubato-resample

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Resample audio in Rust for changing sample rates, normalizing mic input to 16 kHz for ASR, and smoothing variable-rate streams across common rates like 8/16/44.1/48 kHz.

Core Features & Use Cases

  • Flexible resamplers: choose between SincFixedIn, SincFixedOut, FastFixedIn, and SincInterpolationParameters to balance quality and latency.
  • Streaming-ready: supports chunked processing in real-time pipelines with per-call input_frames_next sizing.
  • Channel handling: handles mono to multi-channel input, with optional downmixing before resampling.
  • Practical patterns: includes examples for normalization, streaming pipeline, and stereo-to-mono downmix before resampling.

Quick Start

Create a SincFixedIn resampler to convert 48 kHz input to 16 kHz and integrate it into your audio processing loop.

Frequently Asked Questions about rubato-resample

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I resample audio streams in Rust for real-time processing?

To resample audio streams in Rust, use rubato's SincFixedIn or SincFixedOut types within a real-time processing loop, ensuring proper input framing and channel handling for chunked streaming pipelines. This approach balances configurable quality and latency effectively.

When do I need to normalize microphone input to 16 kHz for ASR in Rust?

You need to normalize microphone input to 16 kHz for ASR in Rust when your source audio is recorded at higher sample rates like 44.1 kHz or 48 kHz, requiring resampling to match the expected input format of speech recognition models.

What is the best way to handle multi-channel audio resampling in Rust?

The best way to handle multi-channel audio resampling in Rust is to apply optional stereo-to-mono downmixing before resampling, then configure rubato's resamplers to process the resulting channels across common audio sampling rates.

Can I use rubato for streaming pipelines with chunked audio input?

Yes, you can use rubato for streaming pipelines by configuring the resampler with proper per-call input_frames_next sizing, allowing it to process chunked audio input efficiently in real-time without dropping frames.

Does rubato's SincFixedIn differ from FastFixedIn for audio resampling?

Rubato's SincFixedIn and FastFixedIn differ in quality and latency trade-offs; SincFixedIn uses SincInterpolationParameters for higher quality resampling, whereas FastFixedIn prioritizes lower latency for real-time audio streams.