Skip to content
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

Can this speak a blog page? #14

Open
fingers10 opened this issue Sep 4, 2023 · 2 comments
Open

Can this speak a blog page? #14

fingers10 opened this issue Sep 4, 2023 · 2 comments

Comments

@fingers10
Copy link

Hi @jsakamoto ,

I'm thinking of integrating speech synthesis functionality in https://ilovedotnet.org and would like to understand if this API has functionality to speak contents of current component. Or I have figure out a way to parse all the text inside the current component and pass it to this API to speak? Your thoughts on this please..

@jsakamoto
Copy link
Owner

Hi @fingers10,

The browser's speech API wrapped by this package doesn't have the functionality to read aloud the contents of the current page. It is more simple and primitive. The speech API can only speak up an utterance object that passed into its argument, consisting of a simple string and some hint information such as pitch or volume.

So, if you want to add a functionality speaking up the ilovedotnet.org contents with this package, you have to figure out a way to parse all the text inside the current component and pass it to this API to speak.

By the way, modern web browsers have built-in "Read aloud" or "Reader View mode" functions. For example, the Microsoft Edge browser allows us to enter "Read Aloud" mode with the Ctrl+Shift+U keyboard shortcut. Microsoft Edge and Mozilla Firefox enter the "Reader View" mode when a user hits the F9 key if the current page is ready for Reader View mode. In the reader view mode of Firefox, when a user enters the N key, it speaks up the page.

So, it might be better to consider to optimize ilovedotnet.org for "Reader View" and W3C accessibility.

@fingers10
Copy link
Author

@jsakamoto Reader View sounds new to me lemme do some study on that and implement.

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

No branches or pull requests

2 participants