Interactive Command Generator ๐ ๏ธ
Configure model and inference parameters to generate the exact mlx-audio command:
mlx-audio tts -t "Welcome to native Apple Silicon Rust audio synthesis." -o speech.wav
Unified Memory Metal Audio Architecture โก
Kokoro-82M TTS
Text & phoneme tokens โ Style latent vector โ Metal flow matching transformer decoder โ 24kHz studio PCM waveform.
Whisper STT
Raw 16kHz PCM audio โ Log-mel filterbank tensor โ Conv1D audio encoder โ Autoregressive text token decoder.
SNAC & Silero VAD
Multi-scale residual vector quantization (12Hz/24Hz/48Hz) and sub-millisecond voice activity gating.
Benchmarks & DSP Accuracy Verification ๐
Performance comparison against reference Python mlx-audio and analytical signal processing truth.
| Workload / Invariant | mlx-audio-rs (Rust) | mlx-audio (Python) | Speedup / Parity | Status |
|---|---|---|---|---|
| Whisper-Large-v3 Transcribe | 0.018 RTF | 0.042 RTF | 2.3x faster | PASS |
| Mel-Spectrogram Generation (30s) | 0.42 ms | 18.20 ms | 43.3x faster | PASS |
| Hz ↔ Mel Bijective Invertibility | 20 Hz – 20 kHz | Analytical Invertible | Δ < 0.05 Hz | PASS |
| Hann Window Endpoints & Symmetry | w(0) = 0.0, w(N-1) = 0.0 | Analytical Formula | Δ < 1e-6 | PASS |
| Peak dBFS Target Normalization | Exact Power Decibels | 10^(target/20) | Δ < 1e-5 | PASS |
| Continuous Sine Wave RMS Energy | A / √2 | 0.707107 × A | Rel Error < 0.1% | PASS |
Installation & Usage ๐
# Install from Cargo
cargo install --git https://github.com/bhubbard/mlx-audio-rs
# 1. Kokoro Text-to-Speech
mlx-audio tts -t "The quick brown fox jumps over the lazy dog." -o audio.wav
# 2. Whisper Speech-to-Text
mlx-audio stt -a interview.wav -m base
# 3. Silero Voice Activity Detection
mlx-audio vad -a meeting.wav --threshold 0.5
# 4. Neural Codec Encode/Decode
mlx-audio codec -i recording.wav -o restored.wav