v1.2.4
livekit/agents-jsv1.2.4Nov 28, 2025by denizsafak
AI Summary
This update significantly enhances the Abogen text-to-speech capabilities by adding subtitle generation support for non-English languages and introducing spaCy for improved sentence segmentation. It also enables offline model usage and includes performance optimizations.
Key Highlights
- Subtitle generation is now available for non-English languages.
- New spaCy integration for better sentence segmentation and reading flow.
- Pre-download models and voices to enable complete offline use.
- Optimized regex compilation and eliminated busy-wait loops for better performance.
- Support for `.` separator in timestamp formats.
New Features
- Subtitle generation for all languages (Line, Sentence, Sentence + Comma).
- spaCy sentence segmentation option for cleaner subtitle breaks.
- Pre-download models and voices for offline usage.
- Support for `HH:MM:SS.ms` timestamp format in text files.
- Optimized regex compilation and elimination of busy-wait loops.
Full Release Notes
- **Subtitle generation is now available for all languages!** Abogen now supports subtitle generation for non-English languages using audio duration-based timing. Available modes include `Line`, `Sentence`, and `Sentence + Comma`. (Note: Word-level subtitle modes remain English-only due to Kokoro's timestamp token limitations.)
- New option: **"Use spaCy for sentence segmentation"** You can now use [spaCy](https://spacy.io/) to automatically detect sentence boundaries and produce cleaner, more readable subtitles. Quick summary:
- **What it does:** Splits text into natural sentences so subtitle entries read better and align more naturally with speech.
- **Why this helps:** The previous punctuation-based splitting could break sentences incorrectly at common abbreviations (e.g. "Mr.", "Dr.", "Prof.") or initials, producing wrong subtitle breaks. spaCy avoids those false splits by using linguistic rules to detect real sentence boundaries.
- **For Non-English:** spaCy runs **before** audio generation to create better sentence chunks for TTS.
- **For English:** spaCy runs **during** subtitle generation to find accurate sentence breaks after TTS.
- **Note:** spaCy segmentation is only applied when subtitle mode is `Sentence` or `Sentence + Comma`. When turned off, it falls back to simple punctuation-based splitting.
- New option: **Pre-download models and voices for offline use** You can now pre-download all required Kokoro models, voices, and spaCy language models using this option in the settings menu. Allowing you to use Abogen completely offline without any internet connection.
- Added support for `.` separator in timestamps (e.g. `HH:MM:SS.ms`) for timestamp-based text files.
- Optimized regex compilation and eliminated busy-wait loops.
- Possibly fixed `Silent truncation of long paragraphs` issue mentioned in #91 by @xklzlxr
- Fixed unused regex patterns and variable naming conventions.
- Improvements in code and documentation.