SillyTavern/SillyTavern · error · Error

Edge TTS module not loaded. Add edge-tts to enable-modules a

Error message

Edge TTS module not loaded. Add edge-tts to enable-modules and restart the Extras API.

What it means

Thrown by EdgeTtsProvider.throwIfModuleMissing when the extras provider is selected but 'edge-tts' is not present in the loaded modules list (the modules array imported from the SillyTavern extras discovery). It signals the Extras backend is reachable but the edge-tts capability was not enabled.

Source

Thrown at public/scripts/extensions/tts/edge.js:248

    getVoicesUrl() {
        if (this.settings.provider === EDGE_TTS_PROVIDER.extras) {
            const url = new URL(getApiUrl());
            url.pathname = '/api/edge-tts/list';
            return url.toString();
        }

        if (this.settings.provider === EDGE_TTS_PROVIDER.plugin) {
            return '/api/plugins/edge-tts/list';
        }

        throw new Error('Invalid TTS Provider');
    }

    async throwIfModuleMissing() {
        if (this.settings.provider === EDGE_TTS_PROVIDER.extras && !modules.includes('edge-tts')) {
            const message = 'Edge TTS module not loaded. Add edge-tts to enable-modules and restart the Extras API.';
            // toastr.error(message)
            throw new Error(message);
        }

        if (this.settings.provider === EDGE_TTS_PROVIDER.plugin && !this.isPluginAvailable()) {
            const message = 'Edge TTS Server plugin not loaded. Install it from https://github.com/SillyTavern/SillyTavern-EdgeTTS-Plugin and restart the SillyTavern server.';
            // toastr.error(message)
            throw new Error(message);
        }
    }

    async isPluginAvailable() {
        try {
            const result = await fetch('/api/plugins/edge-tts/probe', {
                method: 'POST',
                headers: getRequestHeaders({ omitContentType: true }),
            });
            return result.ok;
        } catch (e) {
            return false;

View on GitHub (pinned to 8172dcd0ee)

Solutions

  1. Add 'edge-tts' to enable-modules in the SillyTavern config and restart the server.
  2. Install/upgrade the edge-tts package in the Extras environment (pip install edge-tts).
  3. Confirm the Extras API URL is correct so the modules array actually reflects the running backend.

Example fix

// before
async throwIfModuleMissing() {
    if (this.settings.provider === EDGE_TTS_PROVIDER.extras && !modules.includes('edge-tts')) {
        const message = 'Edge TTS module not loaded. Add edge-tts to enable-modules and restart the Extras API.';
        throw new Error(message);
    }
}

// after - surface current modules for debugging
async throwIfModuleMissing() {
    if (this.settings.provider === EDGE_TTS_PROVIDER.extras && !modules.includes('edge-tts')) {
        throw new Error(
            `Edge TTS module not loaded (available: ${modules.join(', ') || 'none'}). ` +
            `Add edge-tts to enable-modules and restart the Extras API.`,
        );
    }
}
Defensive patterns

Strategy: validation

Validate before calling

function assertExtrasModuleAvailable() {
  if (provider.settings.provider === 'extras' && !modules.includes('edge-tts')) {
    throw new Error('Enable edge-tts in Extras enable-modules and restart the Extras API.');
  }
}
// call before generation/voice listing
assertExtrasModuleAvailable();

Type guard

function extrasHasEdgeTts() {
  return Array.isArray(modules) && modules.includes('edge-tts');
}

Try / catch

try {
  await provider.throwIfModuleMissing();
} catch (e) {
  if (/Edge TTS module not loaded/.test(e.message)) {
    toastr.info('Enable edge-tts in Extras and restart, or switch to the plugin provider.');
    return; // abort generation gracefully
  }
  throw e;
}

Prevention

When it happens

Trigger: Selecting the extras provider while config.yaml enable-modules omits 'edge-tts', or the Extras server was started without that module installed. throwIfModuleMissing runs before generation/voice listing.

Common situations: Fresh Extras install missing the edge-tts python package; enable-modules edited but server not restarted; modules list not yet fetched when the check runs.

Related errors


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