SillyTavern/SillyTavern · error · Error

HTTP ${response.status}: ${response.statusText}

Error message

HTTP ${response.status}: ${response.statusText}

What it means

Thrown by the Chatterbox preview path when POST {provider_endpoint}/tts returns non-2xx during a voice preview. It builds a requestBody, posts JSON, and on failure throws status+statusText. The audio blob is only created on success, so a failure here means no preview audio plays.

Source

Thrown at public/scripts/extensions/tts/chatterbox.js:506

            };

            // Add voice-specific parameters
            if (isReferenceVoice) {
                requestBody.reference_audio_filename = actualVoiceId;
            } else {
                requestBody.predefined_voice_id = actualVoiceId;
            }

            const response = await fetch(`${this.settings.provider_endpoint}/tts`, {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
                },
                body: JSON.stringify(requestBody),
            });

            if (!response.ok) {
                throw new Error(`HTTP ${response.status}: ${response.statusText}`);
            }

            // Get the audio blob and play it
            const audioBlob = await response.blob();
            const audioUrl = URL.createObjectURL(audioBlob);

            const audio = new Audio(audioUrl);
            audio.addEventListener('ended', () => {
                URL.revokeObjectURL(audioUrl);
                this.updateStatus('Ready');
            });

            await audio.play();
        } catch (error) {
            console.error('Error previewing voice:', error);
            this.updateStatus('Ready');
            throw error;
        }

View on GitHub (pinned to 8172dcd0ee)

Solutions

  1. Re-fetch the voice list so the previewed voiceId is current for the installed service version.
  2. Check the Chatterbox service logs for the 500 cause (OOM, model error) during preview.
  3. Confirm requestBody fields match what the installed /tts route expects.
  4. Retry after the service finishes loading its model.

Example fix

// before
if (!response.ok) {
    throw new Error(`HTTP ${response.status}: ${response.statusText}`);
}
// after — include the response body for diagnosis (statusText is often empty)
if (!response.ok) {
    const detail = await response.text().catch(() => response.statusText);
    throw new Error(`Chatterbox preview failed: HTTP ${response.status}: ${detail}`);
}
Defensive patterns

Strategy: try-catch

Validate before calling

// refresh voices so the previewed id is valid for the running service
if (!provider.voices?.length) await provider.fetchTtsVoiceObjects();

Try / catch

try {
    await provider.previewTtsVoice(id);
} catch (err) {
    console.error('Chatterbox preview failed:', err);
    toastr.error(String(err?.message ?? err), 'Chatterbox Preview');
}

Prevention

When it happens

Trigger: Preview requested with a voiceId the service doesn't recognize, service GPU/CPU overloaded returning 500, requestBody missing a required field the installed version expects, or service restarted mid-preview.

Common situations: Previewing a voice whose id no longer exists after a model swap; service out of memory with large requests; mismatch between voice list schema and generation schema across versions.

Related errors


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