Skip to content

Commit 32a96e8

Browse files
noahgiftclaude
andcommitted
feat(audio): Add audio module with mel spectrogram, resampling, streaming
Implements GH-131: Comprehensive audio module for ASR/TTS applications. ## Added - `audio::mel` - Mel spectrogram computation with MelFilterbank - `audio::resample` - High-quality sample rate conversion - `audio::stream` - Chunked streaming primitives - `audio::AudioError` - Unified error type - `audio::DecodedAudio` - Decoded audio container ## Features - `audio` - Core audio processing (rustfft, thiserror) - `audio-capture` - Platform audio capture (future) - `audio-playback` - Platform audio output (future) - `audio-codec` - Format decoding (future) This unblocks whisper.apr CI which depends on the audio feature. Closes #131 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent d450d8a commit 32a96e8

File tree

7 files changed

+1335
-0
lines changed

7 files changed

+1335
-0
lines changed

Cargo.lock

Lines changed: 41 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ rmp-serde = "1.3" # MessagePack for .apr metadata (spec §2)
8989
rand = "0.8"
9090
rand_chacha = "0.3" # ChaCha20 PRNG for Monte Carlo simulations
9191

92+
# Audio processing
93+
rustfft = { version = "6.2", optional = true } # FFT for mel spectrogram computation
94+
thiserror = { version = "2.0", optional = true } # Error handling for audio module
95+
9296
# Parallelization for graph algorithms (optional for WASM compatibility)
9397
rayon = { version = "1.10", optional = true }
9498

@@ -141,6 +145,10 @@ format-quantize = ["half"] # Enable quantization for .apr format (spec §6.2)
141145
format-homomorphic = [] # Enable homomorphic encryption for .apr format (spec: homomorphic-encryption-spec.md)
142146
# Note: mmap is automatic on native platforms, no feature needed (spec: bundle-mmap-spec.md)
143147
hf-hub-integration = ["hf-hub", "dirs"] # Enable Hugging Face Hub integration (GH-100)
148+
audio = ["rustfft", "thiserror"] # Enable audio processing (mel spectrogram, resampling)
149+
audio-capture = ["audio"] # Enable audio capture (ALSA, CoreAudio, WASAPI, WebAudio)
150+
audio-playback = ["audio"] # Enable audio playback
151+
audio-codec = ["audio"] # Enable audio codec decoding (WAV, MP3, AAC, FLAC, Opus)
144152
safetensors-compare = ["safetensors", "hf-hub-integration", "half"] # Enable SafeTensors comparison (GH-121)
145153
inference-monitoring = ["entrenar"] # Enable inference monitoring and explainability
146154
gpu = ["trueno/gpu"] # Enable GPU acceleration via trueno wgpu backend

0 commit comments

Comments
 (0)