Fix speech stopping after a short while

Repository details (talkie)
Project page
talkie
Project log category
(708 entries)
Repository
@joelpurra/talkie
Owner
@joelpurra
Contributors
Contributors on Github
Project status
⏲️ This project has had recent commits.
📂 This project is open.
🌠 This project is popular.
Repository activity period
🗓
Commits
751 commits
Stars
72 stars
Commit details (40da129c)
Author
Authored at
Committer
Joel Purra
Committed at

Commit message

Fix speech stopping after a short while

  • Seems to be related to changes made after the premium version was made, but before v3.0.0.
  • Suspension code was made more resilient to suspend/unload timing issues.
  • Logging to strings was introduced to help with console-to-terminal logging in Chrome.
  • Promise-based logging was introduced for some events handlers.
  • Speech stopping after a short while was traced to the newly introduced logging levels.
  • Turning off debug logging seems to also stop speech, when triggered from the popup and the popup was unfocused/unlaoded.
  • Storing a reference to the current utterance on the background window object seems to prevent the problem.
  • Might be related to garbage collection and speech synthesis using weak references.
  • With this many changes, it's hard to tell (although not at all untestable) if a single change made all the difference. Keeping all changes, assuming that they are all improvements.
Raw text
Fix speech stopping after a short while

- Seems to be related to changes made after the premium version was made, but before v3.0.0.
- Suspension code was made more resilient to suspend/unload timing issues.
- Logging to strings was introduced to help with console-to-terminal logging in Chrome.
- Promise-based logging was introduced for some events handlers.
- Speech stopping after a short while was traced to the newly introduced logging levels.
- Turning off debug logging seems to also stop speech, when triggered from the popup and the popup was unfocused/unlaoded.
- Storing a reference to the current utterance on the background window object seems to prevent the problem.
- Might be related to garbage collection and speech synthesis using weak references.
- With this many changes, it's hard to tell (although not at all untestable) if a single change made all the difference. Keeping all changes, assuming that they are all improvements.

Changed files (13)

Path Additions Deletions
DEVELOP.md +2 -1
src/background/background.js +36 -24
src/background/suspension-connector-manager.js +11 -2
src/background/suspension-manager.js +52 -40
src/background/talkie-speaker.js +34 -20
src/popup/popup.js +1 -1
src/shared/broadcaster.js +51 -55
src/shared/content-logger.js +7 -44
src/shared/log.js +77 -4
src/shared/promise-logging.js +48 -0
src/shared/promise.js +12 -0
src/stay-alive/stay-alive.js +4 -1
src/stay-alive/suspension-listener-manager.js +115 -15

Commit categories (3)