jamiepine/voicebox · error · ValueError
Designed profile {profile_id} is missing design_prompt
Error message
Designed profile {profile_id} is missing design_prompt What it means
Raised in the designed branch of create_voice_prompt_from_profile() when a profile whose voice_type == 'designed' has no design_prompt or an empty/whitespace-only design_prompt. Designed profiles synthesize from a text description, so the prompt is the essential payload; without it the backend has nothing to send to the design model.
Source
Thrown at backend/services/profiles.py:564
# ── 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:
raise ValueError(f"Engine '{engine}' does not support cloned voice profiles")
# ── Cloned profiles: create from audio samples ──
samples = db.query(DBProfileSample).filter_by(profile_id=profile_id).all()
if not samples:
raise ValueError(f"No samples found for profile {profile_id}")
tts_model = get_tts_backend_for_engine(engine)
if len(samples) == 1:
sample = samples[0]View on GitHub (pinned to 51f49dea19)
Solutions
- Set a non-empty design_prompt on the profile row: UPDATE voice_profiles SET design_prompt='...' WHERE id=....
- Recreate the designed profile through create_profile with a valid design_prompt payload.
- Add an app-layer validator that rejects voice_type='designed' with an empty design_prompt at creation/update time.
- If no prompt is intended, switch voice_type to 'preset' or 'cloned'.
Example fix
// before: designed profile with design_prompt=NULL // after profile.design_prompt = 'warm female voice, mid-pitch, calm pace' db.commit()
Defensive patterns
Strategy: validation
Validate before calling
profile = db.query(DBVoiceProfile).filter_by(id=profile_id).first()
if (profile.voice_type or 'cloned') == 'designed' and not (profile.design_prompt or '').strip():
raise HTTPException(409, 'Designed profile is missing design_prompt') Try / catch
try:
prompt = await create_voice_prompt_from_profile(profile_id, db, engine=engine)
except ValueError as e:
if 'missing design_prompt' in str(e):
raise HTTPException(409, str(e))
raise Prevention
- Validate design_prompt is non-empty at profile create/update time when voice_type='designed'.
- Add a NOT NULL + CHECK constraint for design_prompt when voice_type='designed'.
- Test the designed-profile creation path with empty/whitespace prompts.
When it happens
Trigger: A designed profile row was created with design_prompt=NULL or empty string; the field was cleared by an update; voice_type was flipped to 'designed' without supplying a prompt.
Common situations: Profile creation API accepted voice_type='designed' before validation tightened; migration altered voice_type values without backfilling design_prompt; test fixtures omitting the field.
Related errors
- Preset profile {profile_id} is missing preset engine metadat
- Audio file not found: {sample.audio_path}
- Audio file not found: {audio_path}
- Designed profile {profile.id} is missing design_prompt
- Designed profiles require a design_prompt
AI-assisted analysis of jamiepine/voicebox@51f49dea19 (2026-08-12).
Data as JSON: /api/errors/ba4d2c5b41f8a0d9.
Report an issue: GitHub.