ImperialSquid / zotero-zotts

A Zotero plugin to add TTS functionality to the PDF viewer
GNU Affero General Public License v3.0
75 stars 1 forks source link

[FR]: Context Menu: "Speak from here" #119

Open Luram123 opened 3 days ago

Luram123 commented 3 days ago

Checklist

Feature or improvement you want

I've found something similar in the roadmap which is called implement skipping. But what I have in mind is not the same. In my opinion it is an essential feature of a TTS plugin that one can just right-click at one spot within the text and "speak from here" in the context menu. So that the voice starts reading from that point on.

Why should this be added?

Up until now the plugin can read aloud PDF, but either from the beginning of the whole thing, or just one selected passage. That way, when you want to start a PDF in the middle, you have to select each page again and again once the TTS is done reading the last selection.

Screenshots / Drawings / Technical details

No response

ImperialSquid commented 3 days ago

Sounds like a good feature idea, I'll add it to my todo list! 👌

Just as an fyi though, it might not happen super soon.


(Technical details) There are various limitations when it comes to accessing the text of a paper due to security built into Firefox/Zotero (the full text and selected text are both easy to get since they're stored in specific places outside of the paper's internal structure, but accessing the raw text elements isn't), so unless the user were to select enough text to uniquely identify their position in the full text, it would be difficult to know what text element was being selected and thus where to start reading from...

Implementing highlighting will also require accessing the raw text elements though and that's a massively requested feature, so I'll look into adding this one at the same time as I do that.