Repository navigation
fix(vibevoice-asr): add audio resampling and normalization to preprocessing - #510
Merged
Merged
Conversation
lucasnewman
approved these changes
Feb 18, 2026
…essing The VibeVoice ASR model requires 24 kHz input audio normalized to -25 dB FS, matching the official PyTorch pipeline. Previously, when users passed raw waveform arrays (e.g. loaded via librosa at 16 kHz), the audio was used as-is without resampling or normalization, causing poor transcription quality. Changes: - Add `_normalize_audio()` static method that replicates the official VibeVoice AudioNormalizer (target -25 dB FS with clipping avoidance) - Add `sampling_rate` parameter to `_preprocess_audio()`, `generate()`, and `stream_transcribe()` so callers can specify the input sample rate - When an array is passed with a non-24kHz sample rate, resample via `resample_audio()` before encoding - Always normalize array inputs to -25 dB FS for consistent loudness Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
bellkjtt
force-pushed
the
fix/vibevoice-asr-preprocessing
branch
from
February 18, 2026 04:40
96b18ff to
af25c90
Compare
Change generate() and stream_transcribe() defaults to match the official VibeVoice ASR Gradio demo parameters: - top_p: 0.95 -> 1.0 (no filtering) - top_k: 25 -> 0 (disabled) - min_p: 0.02 -> 0.0 (disabled) - repetition_penalty: 1.2 -> 1.0 (no penalty) This produces pure greedy decoding (temperature=0 with no additional sampling filters), which matches the official demo and improves speaker diarization accuracy. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Details
The official VibeVoice ASR pipeline (PyTorch) applies two critical preprocessing steps that were missing in the MLX implementation:
Test plan