Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the version to v25.12.33 and implements consistent text processing for VTT subtitle generation across all TTS engines. The change ensures that SML (Speech Markup Language) patterns are removed and whitespace is normalized in the subtitle text output.
Key changes:
- Adds SML pattern removal and whitespace normalization when creating VTT subtitle entries
- Applies the same text processing logic across all six TTS engine implementations
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| lib/classes/tts_engines/yourtts.py | Updates VTT text field to remove SML patterns and normalize whitespace |
| lib/classes/tts_engines/xtts.py | Updates VTT text field to remove SML patterns and normalize whitespace |
| lib/classes/tts_engines/vits.py | Updates VTT text field to remove SML patterns and normalize whitespace |
| lib/classes/tts_engines/tacotron.py | Updates VTT text field to remove SML patterns and normalize whitespace |
| lib/classes/tts_engines/fairseq.py | Updates VTT text field to remove SML patterns and normalize whitespace |
| lib/classes/tts_engines/bark.py | Updates VTT text field to remove SML patterns and normalize whitespace |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "start": start_time, | ||
| "end": end_time, | ||
| "text": sentence, | ||
| "text": re.sub(r'\s+', ' ', default_sml_pattern.sub('', sentence)).strip(), |
There was a problem hiding this comment.
The text processing logic re.sub(r'\s+', ' ', default_sml_pattern.sub('', sentence)).strip() is duplicated across all six TTS engine files (yourtts.py, xtts.py, vits.py, tacotron.py, fairseq.py, and bark.py). This duplication makes the code harder to maintain - if this logic needs to be updated or fixed, it would need to be changed in six places. Consider extracting this text processing logic into a shared method in the TTSUtils base class, or alternatively, move this processing into the _append_sentence2vtt method since it already performs text normalization on line 313 of utils.py.
No description provided.