OpenBMB/VoxCPM · error · FileNotFoundError
{file_type} '{file_path}' does not exist
Error message
{file_type} '{file_path}' does not exist What it means
Raised by validate_file_exists in voxcpm.cli when the given path does not exist on disk before the CLI proceeds. It is a guard clause so downstream code can assume a valid Path. The message prefixes the file_type (e.g. 'input file', 'prompt wav') for context.
Source
Thrown at src/voxcpm/cli.py:26
import argparse
import json
import os
import sys
from pathlib import Path
from voxcpm.timestamps import align_audio_file
DEFAULT_HF_MODEL_ID = "openbmb/VoxCPM2"
# -----------------------------
# Validators
# -----------------------------
def validate_file_exists(file_path: str, file_type: str = "file") -> Path:
path = Path(file_path)
if not path.exists():
raise FileNotFoundError(f"{file_type} '{file_path}' does not exist")
return path
def require_file_exists(file_path: str, parser, file_type: str = "file") -> Path:
try:
return validate_file_exists(file_path, file_type)
except FileNotFoundError as exc:
parser.error(str(exc))
def validate_output_path(output_path: str) -> Path:
path = Path(output_path)
path.parent.mkdir(parents=True, exist_ok=True)
return path
def validate_ranges(args, parser):
"""Validate numeric argument ranges."""View on GitHub (pinned to f5a1c6a6b9)
Solutions
- Verify the path exists and correct typos/absolute vs relative path
- Run the CLI from the directory containing the file or use an absolute path
- If generated by an upstream step, ensure that step succeeded first
Example fix
# before voxcpm batch --input ./data/missing.txt # after voxcpm batch --input /abs/path/data/inputs.txt
Defensive patterns
Strategy: validation
Validate before calling
from pathlib import Path
p = Path(file_path)
if not p.exists():
raise SystemExit(f"{file_type} '{p}' does not exist") Prevention
- Use absolute paths built from a known root
- Validate inputs in your wrapper script before invoking the CLI
When it happens
Trigger: Calling voxcpm CLI subcommands that validate inputs via require_file_exists (e.g. batch input file, prompt audio path) with a misspelled, relative-path-resolved-wrong, or missing file.
Common situations: Typos in paths, running the CLI from a different working directory so relative paths break, or files not yet downloaded/created by a previous pipeline step.
Understand the failure class
Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.
Related errors
- Timestamp alignment failed: {exc}
- prompt_wav_path does not exist: {prompt_wav_path}
- reference_wav_path does not exist: {reference_wav_path}
AI-assisted analysis of OpenBMB/VoxCPM@f5a1c6a6b9 (2026-08-27).
Data as JSON: /api/errors/2d31603ea72eff84.
Report an issue: GitHub.