microsoft/VibeVoice · error · ValueError
Empty audio list provided
Error message
Empty audio list provided
What it means
When __call__ receives a Python list, it immediately requires it to be non-empty. An empty list cannot be dispatched (the code inspects audio[0] to distinguish paths from arrays), so it fails fast instead of indexing out of bounds or silently returning an empty batch.
Source
Thrown at vibevoice/processor/vibevoice_tokenizer_processor.py:159
"""
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
if all(isinstance(item, str) for item in audio):
# Batch of audio file paths
audio = [self._load_audio_from_path(path) for path in audio]
is_batched = True
else:
# Check if it's batched audio arrays
is_batched = isinstance(audio[0], (np.ndarray, list))
else:
# Single audio array or list
is_batched = False
# Process audio
if is_batched:
processed_audio = [self._process_single_audio(a) for a in audio]
else:
processed_audio = [self._process_single_audio(audio)]View on GitHub (pinned to 94da20d98b)
Solutions
- Skip the call when the batch is empty: if not audio_list: continue.
- Fix upstream filters/loaders that can produce zero items so empty batches are surfaced as their own error.
- For single-item cases, pass the item directly rather than a one-or-zero-element list.
Example fix
# before
enc = processor(audio=loaded) # loaded == [] after filter
# after
if not loaded:
continue
enc = processor(audio=loaded) Defensive patterns
Strategy: validation
Validate before calling
if isinstance(audio, list) and len(audio) == 0:
raise ValueError('empty audio batch — upstream filter removed all items')
enc = tokenizer_processor(audio=audio) Type guard
def is_nonempty_audio_batch(audio) -> bool:
return not isinstance(audio, list) or len(audio) > 0 Try / catch
try:
enc = tokenizer_processor(audio=batch)
except ValueError as e:
if 'Empty audio list' in str(e):
logger.warning('skipping empty batch')
return None
raise Prevention
- Guard batch loops with `if not batch: continue`.
- Make load-failure handling skip the whole batch rather than returning a partial-empty list silently.
- Distinguish 'zero valid items after filtering' from 'load error' in data pipelines.
When it happens
Trigger: Calling processor(audio=[]) — e.g. a manifest-driven pipeline filtered out all files for a shard, or a batch loader dropped failed items and returned [].
Common situations: Batch inference loops over dataset shards where one shard ends up empty after filtering; error-handling code that collects successfully loaded audio and sometimes collects nothing; placeholder code awaiting real data.
Related errors
- Sample index {sample_idx} exceeds batch size {self.batch_siz
- Audio input is required for ASR processing
- Audio input is required
- Unsupported file format: {file_ext}. Supported formats: .wav
- load_audio_bytes_use_ffmpeg requires resample=True
AI-assisted analysis of microsoft/VibeVoice@94da20d98b (2026-08-15).
Data as JSON: /api/errors/9666bc7d501ae7dd.
Report an issue: GitHub.