microsoft/VibeVoice · error · ValueError

Audio input is required for ASR processing

Error message

Audio input is required for ASR processing

What it means

The ASR processor's __call__ requires actual speech: without an audio signal there are no acoustic tokens to build, so passing audio=None fails fast with this ValueError before any tokenization happens. Text-only input is not meaningful for ASR.

Source

Thrown at vibevoice/processor/vibevoice_asr_processor.py:234

            return_tensors: Output format ('pt' for PyTorch, 'np' for NumPy)
            padding: Whether to pad batch inputs
            max_length: Maximum sequence length
            truncation: Whether to truncate long sequences
            add_generation_prompt: Whether to add generation prompt for inference
            use_streaming: Whether to use streaming mode (True by default, auto False if <60s)
            context_info: Optional context information (e.g., hotwords, metadata) to help transcription
            
        Returns:
            BatchEncoding with:
                - input_ids: Token IDs for the model
                - attention_mask: Attention mask
                - acoustic_input_mask: Mask indicating speech token positions
                - speech_tensors: Processed speech features
                - speech_masks: Valid speech masks
                - vae_tok_seqlens: Length of each speech segment in tokens
        """
        if audio is None:
            raise ValueError("Audio input is required for ASR processing")
        
        # Handle single vs batch input
        if isinstance(audio, list):
            is_batched = True
            audio_list = audio
        else:
            is_batched = False
            audio_list = [audio]
        
        # Process each audio input
        all_encodings = []
        for audio_input in audio_list:
            encoding = self._process_single_audio(
                audio_input,
                sampling_rate=sampling_rate,
                add_generation_prompt=add_generation_prompt,
                use_streaming=use_streaming,
                context_info=context_info,

View on GitHub (pinned to 94da20d98b)

Solutions

  1. Pass a valid audio argument: a file path, NumPy array at the expected sample rate, or a list of them for batch input.
  2. If audio comes from a loader, make the loader raise on missing files instead of returning None.
  3. For pure text encoding needs, use the underlying tokenizer directly rather than the ASR processor.

Example fix

# before
enc = asr_processor(text='hello', audio=maybe_audio)  # maybe_audio is None

# after
if maybe_audio is None:
    raise FileNotFoundError('audio segment missing from manifest')
enc = asr_processor(text='hello', audio=maybe_audio)
Defensive patterns

Strategy: validation

Validate before calling

if audio is None:
    raise ValueError(f'no audio for sample {sample_id}')  # surface at data source
enc = asr_processor(text=transcript_hint, audio=audio)

Type guard

def has_valid_audio(audio) -> bool:
    return audio is not None and (isinstance(audio, (str,)) or getattr(audio, 'size', 1) > 0)

Try / catch

try:
    enc = asr_processor(text=t, audio=a)
except ValueError as e:
    if 'Audio input is required' in str(e):
        logger.error(f'skipping sample with missing audio: {sample_id}')
        continue
    raise

Prevention

When it happens

Trigger: Calling processor(text=..., audio=None), calling processor() with no arguments, or forwarding a variable that was never assigned (e.g. audio loaded conditionally and the load branch was skipped).

Common situations: Adapting TTS-style example code (where audio is optional and only used for voice cloning) to the ASR processor; a data pipeline where the audio path was missing from a manifest so the loader silently produced None.

Related errors


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