microsoft/VibeVoice · error · ValueError

Audio input is required

Error message

Audio input is required

What it means

VibeVoiceTokenizerProcessor.__call__ requires an audio argument; None is rejected before any type dispatch (path vs array vs list) begins. The tokenizer processor exists to turn waveforms into model input features, so there is no meaningful default when audio is absent.

Source

Thrown at vibevoice/processor/vibevoice_tokenizer_processor.py:143

        """
        Process audio for VibeVoice models.
        
        Args:
            audio: Audio input(s) to process. Can be:
                - str: Path to audio file
                - np.ndarray: Audio array
                - List[float]: Audio as list of floats
                - List[np.ndarray]: Batch of audio arrays
                - List[str]: Batch of audio file paths
            sampling_rate (int, optional): Sampling rate of the input audio
            return_tensors (str, optional): Return format ('pt' for PyTorch, 'np' for NumPy)
            
        Returns:
            dict: Processed audio inputs with keys:
                - input_features: Audio tensor(s) ready for the model
        """
        if audio is None:
            raise ValueError("Audio input is required")
        
        # Validate sampling rate
        if sampling_rate is not None and sampling_rate != self.sampling_rate:
            logger.warning(
                f"Input sampling rate ({sampling_rate}) differs from expected "
                f"sampling rate ({self.sampling_rate}). Please resample your audio."
            )
        
        # Handle different input types
        if isinstance(audio, str):
            # Single audio file path
            audio = self._load_audio_from_path(audio)
            is_batched = False
        elif isinstance(audio, list):
            if len(audio) == 0:
                raise ValueError("Empty audio list provided")
            
            # Check if it's a list of file paths

View on GitHub (pinned to 94da20d98b)

Solutions

  1. Supply audio as a file path (.wav/.mp3/...), a 1D/2D NumPy array, or a list of either.
  2. Fix wrappers so audio is a required positional, or assert it is present before the call.
  3. In test harnesses, default to a small sine-wave array rather than None.

Example fix

# before
enc = tok_processor(audio=voice.get('audio'))  # dict missing key -> None

# after
enc = tok_processor(audio=voice['audio'])  # KeyError surfaces at the real source
Defensive patterns

Strategy: validation

Validate before calling

if audio is None:
    raise ValueError('audio argument missing — check your input dict before calling')
enc = tokenizer_processor(audio=audio)

Type guard

def has_audio(audio) -> bool:
    return audio is not None

Try / catch

try:
    enc = tokenizer_processor(audio=audio)
except ValueError as e:
    if 'Audio input is required' in str(e):
        raise ValueError('pipeline bug: audio was never loaded') from e
    raise

Prevention

When it happens

Trigger: Calling processor() with no arguments or processor(audio=None), typically via a wrapper that forwards an optional keyword that was never populated.

Common situations: Building input dicts programmatically (inputs = {}; if use_voice: inputs['audio'] = ...) and then calling processor(**inputs) with the key absent; test harnesses with unfixed fixtures.

Related errors


AI-assisted analysis of microsoft/VibeVoice@94da20d98b (2026-08-15). Data as JSON: /api/errors/7f7436170836c778. Report an issue: GitHub.