Mahamedm / Simplified-tts-chrome_extension

A Chrome extension sample that adds a "Speak" option to the context menu and performs TTS on the selected text.
MIT License
1 stars 0 forks source link

Unable to read Chinese aloud, it is normal to read English aloud. #1

Closed jiayouzl closed 1 year ago

jiayouzl commented 1 year ago

Unable to read Chinese aloud, it is normal to read English aloud.

Mahamedm commented 1 year ago

you can change line 17-19 on "tts.js" to this:
chrome.tts.speak(selectedText, { 'lang':'zh-CN', 'rate': 0.8 });
That should make it read Mandarin-Chinese and the "rate" controls the speed of reading.
Hope that helps :)