joelpurra / talkie

Text-to-speech browser extension button. Select text on any web page, and have the computer read it out loud for you by simply clicking the Talkie button.
https://joelpurra.com/projects/talkie/
GNU General Public License v3.0
71 stars 18 forks source link

Pause #13

Open grahamperrin opened 4 years ago

grahamperrin commented 4 years ago

Please, can you add the ability to pause speech?

If I'm overlooking something: sorry.

joelpurra commented 4 years ago

@grahamperrin: it is under consideration, but haven't decided if and how to do it.

Pausing (at least a short period of time, as browsers may unload "inactive" extensions after a while) is technically possible in the Web Speech API. If pausing for longer it might be hard to resume at the previous position, if the extension was unloaded, but perhaps then it would work to resume at the start of the sentence. It also brings a usability change/issue I hadn't planned for when starting to work on Talkie. Basically, the combined play/stop button in the toolbar needs to be reworked to show a menu with additional buttons during playback, and the "right-click selected text to play" menu needs to be expanded similarly. Pausing also adds some complexity to the statefulness of Talkie, so much of the internals (which assume either playing or not playing) would need to be rewritten.

It would probably be a nice improvement, and perhaps also allow for other features. I don't have a timeline for this feature, but will leave this issue open. Thank you for the suggestion!