diff --git a/xtts/bridge.js b/xtts/bridge.js index 023925c..4a8ab0b 100644 --- a/xtts/bridge.js +++ b/xtts/bridge.js @@ -157,24 +157,16 @@ async function _runTTSRequest(payload) { }); }; - // Erst /tts_stream (GET) versuchen — echter Streaming, schnell. - // Bei Fehler Fallback auf /tts_to_audio/ (POST) damit Audio trotzdem kommt. - try { - await streamXTTSAsPCM( - cleanText, - language || "de", - hasCustomVoice ? voiceSample : null, - onChunk, - ); - } catch (streamErr) { - log(`/tts_stream fehlgeschlagen (${streamErr.message}) — Fallback auf /tts_to_audio/`); - await streamXTTSBatch( - cleanText, - language || "de", - hasCustomVoice ? voiceSample : null, - onChunk, - ); - } + // /tts_stream funktioniert nur bei XTTS im local-Modus. daswer123 im + // Remote-API-Modus antwortet mit 400 'HTTP Streaming is only supported + // for local models'. Wir nutzen stabil /tts_to_audio/ (batch render, + // dann Response-Body chunkweise als PCM). + await streamXTTSBatch( + cleanText, + language || "de", + hasCustomVoice ? voiceSample : null, + onChunk, + ); // Am Ende: final-Flag damit App weiss "fertig" und Cache geschrieben werden kann if (pcmMeta) {