-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to get currently displayed page text from ePub #27
Comments
What are the use cases for the text of the currently displayed page instead of the whole text of the publication or current chapter? |
For example grabbing displayed text for synthezizing voice for people with visual impairment through another library without synthezizing whole chapter. Implementing custom translation etc. |
TTS is supported in Readium, and can start from the current page. It's not available yet in the React native package though. For the translation, you can get the text of a user selection and translate it. Translating the current page but not the full chapter would be complicated, and I don't really see the use case. |
What languages does readium support for tts when it gets implemented in react native? Can it be customized? Will it parse language specific characters? All these questions can have an answer if the developer has access to implement custom tts. Not all books have chapters short enough for reasonable tts synthezizing in one batch and user selection is not always reliable or user friendly. Sadly o dont speak java or swift to open a pull request myself |
@elraito IIRC readium's TTS support relies on the underlying OS's TTS functionality. Therefore anything available there would be available in Readium. @mickael-menu correct me if I'm wrong. |
The TTS in Readium is made of several independent components:
Sentences are never synthesized by the TTS engine in one batch. Utterances are computed lazily for a whole chapter, but synthesized/spoken one by one when needed. I'm asking all these questions to see if something is missing in the core Readium API. In any case you should be able to inject your own JavaScript for unusual use cases. |
Please add a method to to get text from currently displayed page.
Whats would this enable:
It would be helpful to implement accessibility options i.e. text-to-speech implementations.
Or ability to get a copy of text if the ePub might be educational for example.
Ability to create implementation for citations.
etc....
Personally i would love if it was in one of two formats:
a) A method accessible through ref you can manually call.
b) A callback that is fired on page change.
I personally favor option a but this is only an opinion.
The text was updated successfully, but these errors were encountered: