acoti / articulate.js

A jQuery plugin that lets the browser speak to you.
http://articulate.purefreedom.com
MIT License
139 stars 28 forks source link

Spanish language support? #3

Open martinmurciego opened 7 years ago

martinmurciego commented 7 years ago

Has some support for Spanish language. Congratulations great idea!

acoti commented 7 years ago

Thanks!

I have not tested this with Spanish. Depending on the browser/platform, there are voices available that support various languages . For example, on Windows 10/Chrome, you can see quite a few when visiting this link:

Microsoft Demo

But it all depends on the browser. Right now, everything in Articulate.js is voiced with the default. I'm not sure, but maybe the default voice is always the same language as the operating system default. Regardless, I think the mechanics of this plugin would work in any language.

If you test this, please let us know what you find.

Yimiprod commented 7 years ago

Can confirm @acoti on chrome the first voice get from speechSynthesis.getVoices() is based on the local language.

Knowing that, at https://github.com/acoti/articulate.js/blob/master/articulate.js#L136 we can test on en-EN or something similar to get the first one with the locale of the text read and not just the locale of the user.

acoti commented 7 years ago

Thanks for testing this.

Later today, I'll be updating Articulate.js to allow for selecting a voice by name or language.