tts: raise chunk caps to 500/2500 (sidecar phantom fix landed, single-chunk MSE streaming back)
This commit is contained in:
parent
0c024fa899
commit
cbc4596315
1 changed files with 6 additions and 7 deletions
|
|
@ -67,13 +67,12 @@ const AUDIO_FORMAT = detectAudioFormat();
|
|||
const ttsCache = new Map();
|
||||
|
||||
// Split long text into chunks at sentence boundaries.
|
||||
// IMPORTANT: F5-TTS internally chunks any input above ~135 chars (its default
|
||||
// max_chars) and prepends the reference audio to each sub-chunk's output,
|
||||
// causing audible "phantom" phrases (e.g. ref text "IT IS NEVER OPENED" bleeds
|
||||
// in). Capping at 120 chars per request keeps F5 in single-chunk mode = clean
|
||||
// audio. With PlaylistAudio pipelining, more+smaller chunks also lower TTFA.
|
||||
const TTS_CHUNK_MAX = 120; // upper bound per chunk (under F5's internal 135 threshold)
|
||||
const TTS_FIRST_CHUNK_MAX = 120; // first chunk same — there's no win in making it smaller
|
||||
// Sidecar now ships per-chunk silence trim + whisper-transcribed ref_texts
|
||||
// (uncloseai-speech 831b937 + 015bbdf), so F5 no longer bleeds ref_audio into
|
||||
// chunked output. Small first chunk gets MSE byte-streaming + fast TTFA on
|
||||
// typical chat responses; larger subsequent chunks pipeline via PlaylistAudio.
|
||||
const TTS_CHUNK_MAX = 2500; // upper bound per chunk (server-side comfortable)
|
||||
const TTS_FIRST_CHUNK_MAX = 500; // smaller first chunk for low time-to-first-audio
|
||||
|
||||
// Strip patterns F5 would pronounce character-by-character (URLs, paths, emails).
|
||||
// F5 has no spell-vs-speak heuristic — feeding it https://foo.bar produces audible
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue