Repository navigation
fix: stop short mlx chunks stalling playback - #77
Merged
Merged
Conversation
Split over-long sentences at commas, semicolons, colons and dashes before falling back to word boundaries, and fill a chunk under 60 characters from the next sentence instead of sending it alone. A short chunk ahead of a long one left a pause of several seconds while the long one generated.
There was a problem hiding this comment.
No issues found across 3 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Heads up: you’re close to your included review allowance. Set a flex budget so reviews don’t pause.
View guided diff | Turn on auto-fix | Re-trigger cubic
There was a problem hiding this comment.
All reported issues were addressed across 3 files (changes from recent commits).
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
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.
Was getting a few seconds of silence partway through replies on the mlx backend. Down to how
split_long_textpacks the chunks, a short sentence went out on its own ahead of a full 170 char chunk so it finished playing long before the next one had generated. "Yes." followed by a long sentence sat there for 7.3s! Long sentences were also getting cut at whatever word hit the limit, mid clause.Now anything over 170 splits at
,;:or a dash first and only falls back to words if a clause is still too long, and a chunk under 60 chars borrows the start of the next sentence rather than going out alone. (Tried ramping chunk sizes up from a small first one as well, made it worse, the fixed cost per generate call eats the head start.)Ran four texts through a local model just under real time, old vs new, timing playback by sleeping for each chunk's duration. The two with a short opener had no gaps after, the two normal paragraphs chunk the same as before. Downside is first audio comes later when a reply opens on something tiny (1.0s to 8.9s worst case), same as a long opener gets now.
434 tests (4 new), ruff clean, README updated.