SillyTavern/SillyTavern · error · Error

<Coqui TTS module>

Error message

<Coqui TTS module> 

What it means

BUG: throwIfModuleMissing calls `throw new Error(DEBUG_PREFIX, message)`. The standard Error constructor takes a single message string; the second argument (the helpful explanation) is silently ignored. So the thrown error's message is just DEBUG_PREFIX ('<Coqui TTS module> ') and the actionable text ('Add coqui-tts to enable-modules...') is lost. The underlying condition is that the Extras API was started without the coqui-tts module enabled.

Source

Thrown at public/scripts/extensions/tts/coqui.js:47

        "kokoro": {
            "tacotron2-DDC": "tts_models/ja/kokoro/tacotron2-DDC"
        }
    }
}
*/
const languageLabels = {
    'multilingual': 'Multilingual',
    'en': 'English',
    'fr': 'French',
    'es': 'Spanish',
    'ja': 'Japanese',
};

function throwIfModuleMissing() {
    if (!modules.includes('coqui-tts')) {
        const message = 'Coqui TTS module not loaded. Add coqui-tts to enable-modules and restart the Extras API.';
        // toastr.error(message, { timeOut: 10000, extendedTimeOut: 20000, preventDuplicates: true });
        throw new Error(DEBUG_PREFIX, message);
    }
}

function resetModelSettings() {
    $('#coqui_api_model_settings_language').val('none');
    $('#coqui_api_model_settings_speaker').val('none');
}

class CoquiTtsProvider {
    //#############################//
    //  Extension UI and Settings  //
    //#############################//

    settings;

    defaultSettings = {
        voiceMap: {},
        customVoices: {},

View on GitHub (pinned to 8172dcd0ee)

Solutions

  1. Fix the bug: pass a single message — `throw new Error(DEBUG_PREFIX + message)` or `throw new Error(message)` — so users see the real instructions.
  2. On the ops side: restart the Extras API with coqui-tts in --enable-modules (e.g. --enable-modules=caption,chaterbox,coqui-tts).
  3. Confirm the connected Extras URL is the one that has coqui-tts enabled (not a different instance).

Example fix

// before
throw new Error(DEBUG_PREFIX, message);
// after
throw new Error(DEBUG_PREFIX + message);
Defensive patterns

Strategy: validation

Validate before calling

// ensure module enabled before any Coqui call
if (!modules.includes('coqui-tts')) {
    toastr.error('Enable the coqui-tts module in Extras and restart.', 'Coqui TTS');
    return;
}

Type guard

/** @param {string[]} mods */
const coquiEnabled = (mods) => Array.isArray(mods) && mods.includes('coqui-tts');

Try / catch

try {
    CoquiTtsProvider.installModel(model_id, action);
} catch (err) {
    // NOTE: current message is just DEBUG_PREFIX due to the two-arg Error() bug — fix the throw first
    console.error('Coqui module error:', err);
}

Prevention

When it happens

Trigger: Calling any CoquiTtsProvider method (install, generate, list, etc.) when the SillyTavern Extras server was launched without `--enable-modules=...coqui-tts...` so the global `modules` array does not include 'coqui-tts'.

Common situations: User installed/runs the Extras API without coqui-tts; switched Extras instances to one lacking coqui-tts; module name misspelled in the enable-modules flag.

Related errors


AI-assisted analysis of SillyTavern/SillyTavern@8172dcd0ee (2026-08-13). Data as JSON: /api/errors/834f7be6552f7ea8. Report an issue: GitHub.