TL;DR
Modern Text-to-Speech (TTS) models sound uncannily human over a sentence or two, but ask them to narrate an entire audiobook on the fly, and their voices warp, stutter, or grind your GPU to a halt. By noticing that TTS Transformers naturally want to read locally rather than globally, the authors introduce PSW-Speech: a streaming architecture that uses smart sliding windows and a tiny voice-anchoring prefix. Trained only on audio clips under 30 seconds, this lightweight model can smoothly synthesize hours of speech with linear compute—no massive training contexts required.
What Problem Does This Paper Address?
As Large Language Models increasingly power audiobooks and real-time voice assistants, TTS systems face two massive hurdles: long-form stability and streamability (reading incoming text chunks and outputting audio incrementally).
Standard Transformer TTS models use global attention, looking at the entire text and all previously generated audio at every step. This causes two headaches:
- Compute scales quadratically: Generating an hour of audio becomes prohibitively slow and memory-heavy.
- Length generalization & error accumulation: Because long studio recordings are rare, models are trained on short clips (10–30 seconds). Push them past their training horizon, and alignment breaks down or errors snowball, causing "speaker drift" where the voice gradually morphs into someone else—or dissolves into gibberish.
Methods
Instead of inventing a complex new neural network, the authors adapt a standard 330M-parameter encoder–decoder Transformer (using continuous latent audio tokens and a Flow-Matching sampling head) by constraining where it is allowed to look.
Here is what makes PSW-Speech tick:
- Prefixed Sliding Window (PSW) Self-Attention: As the autoregressive decoder generates audio, it only attends to a small sliding window of recent audio tokens (e.g., the last ~5 seconds), keeping complexity linear. Crucially, it keeps a permanent prefix visible—the first few seconds of audio representing the speaker prompt—which acts as an unchanging anchor for speaker identity.
- Sliding Window (SW) Cross-Attention: To read the text, the decoder only looks at a tiny window (radius of 2 tokens) around its current reading position. At inference, how does it know when to advance the window? A delightfully simple heuristic: it just re-centers the next step's window on whichever text token got the highest attention weight in the current step.
- Jittered Training Masks: During training, ground-truth text-to-audio alignments are pre-computed using a tiny 50M-parameter helper TTS model. However, centering the cross-attention mask directly on the exact ground-truth token lets the model "cheat" by just reading the window's center coordinate rather than the text itself. Adding random uniform shifts (jitter) to the mask center during training forces the model to actually pay attention to the words.
- Blockwise Packet Text Encoding: To stream text without breaking Rotary Positional Embeddings (RoPE), incoming text is chopped into variable-sized packets and encoded independently. Packet size becomes a free dial at inference time to control text "look-ahead."
Datasets
- Training: A mix of HiFiTTS-2 (derived from LibriVox audiobooks) and the English subset of Emilia, alongside LibriTTS (for the speech tokenizer). All training segments are shorter than 30 seconds.
- Evaluation: Short-form quality is tested on SEED-en. For extreme durations, the authors introduce Very-Long LibriSpeech—a new benchmark built by matching LibriSpeech
test-cleanutterances back to their full original Project Gutenberg books and LibriVox recordings, enabling evaluation on continuous speech lasting up to 100 minutes (compared to the 4-minute cap of prior benchmarks like LibriSpeech-Long).
Key Insights and Ideas
- Global attention in TTS is mostly wasted: When analyzing a standard global-attention TTS model, the authors found that cross-attention heads naturally split into just two regimes: tracking a tight, monotonic diagonal along the text, or dumping unused attention mass into input-independent "sink" tokens. Enforcing local windows simply codifies what the model already tries to do.
- Enforce locality at training, not just inference: You cannot just slap a sliding window onto a globally trained TTS model at test time—synthesis completely collapses (65.3% Character Error Rate). And without training-time jitter on that window, CER still spikes from 1.1% to 13.6%.
- Tiny look-aheads are enough for natural prosody: You don't need to read a whole page ahead to sound natural. Performance saturates at a text packet size of just 8–32 tokens (roughly 3 to 10 words of look-ahead).
- A 5-second prefix cures speaker drift: Sliding windows prevent past errors from lingering in context, while keeping a 5-second prompt prefix permanently visible locks in the speaker's voice indefinitely. Interestingly, once this prefix is present, explicit "attention sink" tokens become completely optional.
Key Results
- Unbounded, flat-line stability: On Very-Long LibriSpeech, PSW-Speech (0.3B parameters) is the only tested model whose intelligibility and quality remain completely flat from <1 minute all the way to the 10–100 minute stratum—maintaining a 1.1% CER, 0.67 speaker similarity (SIM), and 3.85 Naturalness MOS (N-MOS).
- Beating giants on long-form: Compare that to VibeVoice, a 1.5B-parameter model (5× larger) explicitly trained with long-context curriculum learning. In the 10–100 minute range, VibeVoice's speaker similarity drops from 0.75 to 0.55, and its subjective speaker similarity (S-MOS) collapses from 4.18 to 2.70, whereas PSW-Speech holds steady at 4.20.
- Zero penalty on short-form: On short clips (SEED-en), restricting attention to sliding windows costs nothing—PSW-Speech matches its global-attention twin on CER (1.4%) while slightly improving human naturalness and similarity ratings, and outperforming streaming baseline VoXtream across the board.
Limitations and Future Work
- Scope and Scale: Training was limited to English read speech (audiobooks) and a modest 330M parameter count due to compute budgets (trained in just 2 days on two RTX 4090s!). Testing whether this scales to conversational speech, code-switching, other languages, and multi-billion-parameter backbones remains open.
- Guidance overhead: To maximize quality and voice adherence, inference relies on Classifier-Free Guidance (CFG) across both the prefix and text, requiring extra forward passes per step. The authors point to guidance distillation as a promising next step to trim inference costs even further.
Summary updated