PabloRomanH / zhongzhong

Chrome extension that translates Chinese words when hovering on them.
https://chrome.google.com/webstore/detail/zhongzhong-an-improved-ch/dggcgdjndddfmcfoipccicfoajmciacf
34 stars 14 forks source link

Add a read word aloud option without needing to click V #48

Open ghakiel opened 3 years ago

ghakiel commented 3 years ago

It would make reading much more better. Please and thank you!

PabloRomanH commented 3 years ago

How would it work? When would the audio play? You want to be able to click on a button? Or just to have the audio play everytime you hover over a word?

What's your usage case? Do you go word by word to listen to whole sentences?

ienablemuch commented 3 years ago

It would make reading much more better. Please and thank you!

Made this work on Chinese words separator extension, just press the Alt+R one time, so when you hover over a word or phrase, the word/phrase will be automatically read aloud. To deactivate automatic read aloud, press the Alt+R shortcut again. The Alt+R shortcut can be assigned in chrome://extensions/shortcuts

https://chrome.google.com/webstore/detail/chinese-words-separator/gacfacdpfimbkgcnlegknnmcccjgcbnp

If you are using Zhongzhong and an N keyboard shortcut user, and you want the next word be 'automatically' read aloud, just press N and V at the same time, but press letter N a little bit ahead than letter V. Voila! you have automatic read aloud functionality without adding anything in the code, sometimes the best code is no code at all :) Think of it as on-demand read aloud

I realized when pressing two keys at the same, it's easier to make the next word key be pressed a little bit ahead before voice key if the letter N comes first before letter V in the keyboard layout. However, V comes first before N in the keyboard layout, and they are one key apart making it a little cumbersome to be pressed at the same time

With that in mind, I think it's better for Zhongzhong to change the N keyboard shortcut for Next Word to letter A (think Advance to next word), then change the V keyboard shortcut for Voice (read aloud) to letter S (think Say/Speak it, or Sound). This way, it's easier to press letter A a little bit ahead than S when pressing both keys at the same time since A comes first before S in the keyboard layout, and those two keys are adjacent to each other

PabloRomanH commented 3 years ago

With that in mind, I think it's better for Zhongzhong to change the N keyboard shortcut for Next Word to letter A (think Advance to next word), then change the V keyboard shortcut for Voice (read aloud) to letter S (think Say/Speak it, or Sound). This way, it's easier to press letter A a little bit ahead than S when pressing both keys at the same time since A comes first before S in the keyboard layout, and those two keys are adjacent to each other

I don't think I'm going to change the shortcuts. It would inconvenience a lot of people for just a very minor problem in a very minor use case. If you find yourself often wanting to hear aloud whole phrases, maybe it would be better to install a separate read-aloud extension.

But adding a new shortcut to enable automatic read-aloud doesn't sound complicated, especially if it's not too easy to trigger. I'll look into this.