Hmbown/CodeWhale · error · anyhow::Error

mimo-v2.5-tts-voicedesign requires --voice-prompt or…

Error message

mimo-v2.5-tts-voicedesign requires --voice-prompt or --instruction to describe the voice

What it means

The mimo-v2.5-tts-voicedesign model requires a textual description of the desired voice, supplied via --voice-prompt or --instruction (combined by combine_speech_instructions); if the combined instruction is missing or whitespace-only the command bails. Voice design cannot proceed without a voice description.

Solutions

  1. Add --voice-prompt "<description of the desired voice>"
  2. Or add --instruction "<voice description>"
  3. Ensure the provided value is not empty/whitespace-only

Example fix

// before
codewhale speech --model mimo-v2.5-tts-voicedesign --text "hi"
// after
codewhale speech --model mimo-v2.5-tts-voicedesign --voice-prompt "warm, calm female narrator" --text "hi"
Defensive patterns

Strategy: validation

Validate before calling

let is_voice_design = model.to_ascii_lowercase().contains("voicedesign");
let has_desc = instruction.as_deref().is_some_and(|v| !v.trim().is_empty());
if is_voice_design && !has_desc {
    eprintln!("voicedesign requires --voice-prompt or --instruction");
    std::process::exit(2);
}

Prevention

When it happens

Trigger: Running `speech` with a voicedesign model (model name containing "voicedesign") but neither --voice-prompt nor --instruction, or passing only empty/whitespace values.

Common situations: Quoting mistakes leaving an argument empty (--voice-prompt ""); scripts that set the model to voicedesign without setting the prompt; misunderstanding that voicedesign needs a description unlike plain TTS.

Understand the failure class

Background: "Must pass :limit option" / "Missing required option" — required option errors explained — this error's family across 41 libraries.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/619d47c1b6f3c182. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/lib.rs:7841

        voice_prompt.is_some(),
    );
    let model_lower = model.to_ascii_lowercase();
    if !model_lower.contains("tts") {
        bail!(
            "speech requires a TTS model (examples: {}); got {model}",
            SPEECH_MODEL_EXAMPLES.join(", ")
        );
    }
    let is_voice_design = model_lower.contains("voicedesign");
    let is_voice_clone = model_lower.contains("voiceclone");

    let instruction = combine_speech_instructions(instruction, voice_prompt);
    if is_voice_design
        && instruction
            .as_deref()
            .is_none_or(|value| value.trim().is_empty())
    {
        bail!(
            "mimo-v2.5-tts-voicedesign requires --voice-prompt or --instruction to describe the voice"
        );
    }

    let voice = if let Some(clone_path) = clone_voice {
        Some(encode_voice_clone_sample_data_uri(&clone_path)?)
    } else if is_voice_design {
        None
    } else if let Some(value) = voice.filter(|value| !value.trim().is_empty()) {
        Some(value)
    } else if is_voice_clone {
        bail!("mimo-v2.5-tts-voiceclone requires --clone-voice <mp3|wav> or --voice <data-uri>");
    } else {
        Some(DEFAULT_VOICE.to_string())
    };
    let format = normalize_speech_format(&format).with_context(|| {
        format!("Unsupported speech format '{format}' (allowed: wav, mp3, pcm16)")
    })?;

View on GitHub (pinned to 73e0f67d83)