jamiepine/voicebox · error · ValueError
Preset profile {profile_id} only supports engine '{profile.p
Error message
Preset profile {profile_id} only supports engine '{profile.preset_engine}', not '{engine}' What it means
Raised in the preset branch of create_voice_prompt_from_profile() when the requested engine argument differs from the profile's preset_engine. Preset voices are bound to one specific engine at creation time (e.g. a 'qwen' preset voice id is not valid for a 'chatterbox' backend), so the engine parameter must agree with profile.preset_engine.
Source
Thrown at backend/services/profiles.py:552
Returns:
Voice prompt dictionary
"""
from ..backends import get_tts_backend_for_engine
profile = db.query(DBVoiceProfile).filter_by(id=profile_id).first()
if not profile:
raise ValueError(f"Profile not found: {profile_id}")
voice_type = getattr(profile, "voice_type", None) or "cloned"
validate_profile_engine(profile, engine)
# ── Preset profiles: return engine-specific voice reference ──
if voice_type == "preset":
if not profile.preset_engine or not profile.preset_voice_id:
raise ValueError(f"Preset profile {profile_id} is missing preset engine metadata")
if profile.preset_engine != engine:
raise ValueError(
f"Preset profile {profile_id} only supports engine '{profile.preset_engine}', not '{engine}'"
)
return {
"voice_type": "preset",
"preset_engine": profile.preset_engine,
"preset_voice_id": profile.preset_voice_id,
}
# ── Designed profiles: return text description (future) ──
if voice_type == "designed":
if not profile.design_prompt or not profile.design_prompt.strip():
raise ValueError(f"Designed profile {profile_id} is missing design_prompt")
return {
"voice_type": "designed",
"design_prompt": profile.design_prompt,
}
if engine not in CLONING_ENGINES:View on GitHub (pinned to 51f49dea19)
Solutions
- Pass engine=profile.preset_engine when calling the function for a preset profile instead of a hardcoded/default value.
- In the API route, read the profile first and set the engine from profile.preset_engine before invoking synthesis.
- Restrict the client engine selector so users cannot choose an engine incompatible with a selected preset voice.
- If multi-engine support is required for the same voice, create separate preset profiles per engine.
Example fix
// before prompt = await create_voice_prompt_from_profile(profile_id, db, engine='chatterbox') // after: derive engine from the preset profile itself profile = db.query(DBVoiceProfile).filter_by(id=profile_id).first() prompt = await create_voice_prompt_from_profile(profile_id, db, engine=profile.preset_engine)
Defensive patterns
Strategy: validation
Validate before calling
profile = db.query(DBVoiceProfile).filter_by(id=profile_id).first()
if (profile.voice_type or 'cloned') == 'preset' and engine != profile.preset_engine:
raise HTTPException(409, f"Engine {engine} incompatible with preset profile (use {profile.preset_engine})") Try / catch
try:
prompt = await create_voice_prompt_from_profile(profile_id, db, engine=engine)
except ValueError as e:
if 'only supports engine' in str(e):
raise HTTPException(409, str(e))
raise Prevention
- Derive the engine argument from profile.preset_engine rather than a global default.
- Restrict the client engine selector based on the selected preset profile.
- Create separate preset profiles per engine if a voice must work across engines.
When it happens
Trigger: Calling create_voice_prompt_from_profile(profile_id, db, engine='chatterbox') on a profile whose preset_engine is 'qwen'; defaulting the engine parameter to the server default when the preset profile was created for a different engine; client requests synthesis with an engine that does not match the preset profile's bound engine.
Common situations: Server default engine changed after preset profiles were created; client UI lets the user pick an engine independently of the selected preset voice; mixing preset profiles across multi-engine deployments without reconciling the engine param.
Related errors
- Preset profiles must use their preset_engine as default_engi
- Preset profile {profile_id} is missing preset engine metadat
- Preset profiles require both preset_engine and preset_voice_
- Preset voice '{preset_voice_id}' is not valid for engine '{p
- Profile not found: {profile_id}
AI-assisted analysis of jamiepine/voicebox@51f49dea19 (2026-08-12).
Data as JSON: /api/errors/15712ce2b5de372e.
Report an issue: GitHub.