v1.1 — Built-in TTS Engine & Improved Script Quality
Alexandria v1.1 — Built-in TTS Engine & Improved Script Quality
Two major areas of improvement: a fully integrated local TTS engine that eliminates the need for an external server, and a significantly better LLM prompt that produces more faithful, expressive audiobook scripts.
Built-in Qwen3-TTS Engine
- No external server required — TTS models load directly in-process, no separate Gradio server needed
- Batch (Fast) rendering — New render mode sends multiple lines to TTS in a single batched call for 3-6x real-time throughput
- Codec compilation — Optional
torch.compileoptimization for 3-4x faster batch decoding (toggle in Setup tab) - Smart sub-batching — Automatically groups similarly-sized text chunks to minimize wasted GPU compute on padding
- Configurable from UI — Sub-batch settings (enabled, min size, length ratio) and compile toggle exposed in Setup tab
- ROCm auto-optimizations — MIOpen fast-find mode, Triton flash attention, and triton_key compatibility shim applied transparently on AMD GPUs
Improved Script Generation Prompts
- Hearing test rule — Narrator/character split now uses "would another character in the scene hear it?" instead of the old first-person heuristic that was converting third-person narration into character dialogue
- Author text preservation — Explicit rules to never change person, tense, or wording. The LLM no longer rewrites "His experience was like living in the past" as a character saying "My experience is like living in the past"
- Attribution tag handling — Dialogue tags like "said Brin" are dropped (voice assignment replaces them), but descriptive actions from attributions are preserved as NARRATOR text
- Richer instruct directions — Changed from "3-8 words" to "2-3 sentences" for dramatically better TTS emotiveness and prosody
- Better context continuity — Each chunk now receives a character roster and the last 3 script entries instead of the broken "main character" frequency heuristic
Character Style (replaces Default Style)
- New
character_stylefield — Persistent character traits (accents, speech patterns) that append to every TTS instruct for that speaker - Examples: "Heavy Scottish accent", "Refined aristocratic tone", "Speaks in clipped military cadence"
- Backward compatible with existing
default_stylein voice configs
Other Changes
- Cleaned up default prompts for general audience
- Fixed triple-quote syntax error in
app.pyDEFAULT_SYSTEM_PROMPT - Updated README with new API examples, instruct style guidance, and performance documentation
- Added audiobook sample to README
Performance
Tested on AMD RX 7900 XTX (24 GB VRAM, ROCm 6.3):
| Configuration | Throughput |
|---|---|
| Standard mode (sequential) | ~1x real-time |
| Batch mode, no codec compile | ~2x real-time |
| Batch mode + compile_codec | 3-6x real-time |
A 273-chunk audiobook (~54 minutes of audio) generates in approximately 16 minutes with batch mode and codec compilation enabled.