Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors text segmentation and processing logic for TTS (Text-to-Speech) engines. The changes consolidate text cleaning operations and improve sentence segmentation by merging short segments with their predecessors.
- Refactored sentence segmentation in
core.pyto merge consecutive segments when the following segment contains fewer than 3 alphanumeric characters - Centralized text processing (SML pattern removal and whitespace normalization) from individual TTS engine files to a common utility function
- Improved VTT subtitle generation by applying consistent text processing in a single location
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| lib/core.py | Refactored loop to merge short segments (< 3 alphanumeric chars) with previous segments using lookahead logic |
| lib/classes/tts_engines/yourtts.py | Simplified sentence_obj text assignment to use raw sentence instead of processed text |
| lib/classes/tts_engines/xtts.py | Simplified sentence_obj text assignment to use raw sentence instead of processed text |
| lib/classes/tts_engines/vits.py | Simplified sentence_obj text assignment to use raw sentence instead of processed text |
| lib/classes/tts_engines/tacotron.py | Simplified sentence_obj text assignment to use raw sentence instead of processed text |
| lib/classes/tts_engines/fairseq.py | Simplified sentence_obj text assignment to use raw sentence instead of processed text |
| lib/classes/tts_engines/bark.py | Simplified sentence_obj text assignment to use raw sentence instead of processed text |
| lib/classes/tts_engines/common/utils.py | Centralized text processing logic (SML removal and whitespace normalization) in VTT writing function |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.