Skip to content

Fix Speak.activity Enter key repeat playback#2183

Open
rommeltrejo wants to merge 1 commit into
llaske:devfrom
rommeltrejo:fix/speak-enter-repeat
Open

Fix Speak.activity Enter key repeat playback#2183
rommeltrejo wants to merge 1 commit into
llaske:devfrom
rommeltrejo:fix/speak-enter-repeat

Conversation

@rommeltrejo

@rommeltrejo rommeltrejo commented May 7, 2026

Copy link
Copy Markdown

Changes

Holding Enter in Speak.activity could trigger repeated playback while speech was already running. After enough repeats, the activity triggers slow downs, or runs out of memory and breaks. On the Sugarizer apps the user sees a blank screen after running out of memory; on the browser try-it site Chrome/Edge will ask the user to reload the page.

This change makes Enter handling behave more cleanly:

  • only one playback runs at a time
  • repeated Enter key events do not start overlapping playback
  • if Enter is still being held, playback starts again only after the current one finishes

Reproduce

  1. Open Sugarizer
  2. Launch Speak.activity
  3. Type text in the input box
  4. Press and hold Enter
  5. Keep holding Enter while playback starts

Before

  • repeated Enter key events could retrigger playback immediately
  • playback could overlap or re-enter while already running
  • after enough repeats, the activity becomes unstable

Video
page@31750c6f0a4c96ea1bb7515aea9383a6.webm

While the speech is active the play button is disabled, but it will start playing again when done if the user (my kid) keeps the Enter button pressed.

speak-after-hold

Issue context

The linked issue should keep the same concrete impact described here:

  • repeated playback can snowball into severe slowdown and memory exhaustion
  • in the Sugarizer app this can end as a blank screen
  • in browser try-it flows Chrome/Edge may prompt a reload

Closes #2182

@nithinshiju-dev

Copy link
Copy Markdown

@rommeltrejo You’re only supposed to raise a PR once you’ve gotten approval from the maintainer for the issue you raised.

@karthik-dev56

karthik-dev56 commented May 7, 2026

Copy link
Copy Markdown

@rommeltrejo close the PR read the contrubution guidlines your are not supposed to raise PR with out maintener approval

@rommeltrejo

Copy link
Copy Markdown
Author

@nithinshiju-dev will do, I got too excited to finally fix this issue :)

@rommeltrejo rommeltrejo closed this May 7, 2026
@rommeltrejo rommeltrejo reopened this May 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants