Open The-Linguist opened 2 years ago
Additional things to mention:
setLanguage()
instead any of en-GB en-US en-AU en-CA en-IN en-NZ en-ZA and is good at catching both British and American pronunciations.Upon further and deeper search I've found https://www.ibabbleon.com/iOS-Language-Codes-ISO-639.html
It would be great if everyone «who gets to test it» shared his/her test results to let us find how reliable that is.
EDIT: As mentioned above in javascript annyang.setLanguage("zh");
works and annyang.setLanguage("zh-Hans");
doesn't work.
On this page I see that "zh-CN" for mainland and "zh-TW" for Taiwan are listed for Chinese; and "zh" is not listed. But on developers.apple.com like this page I often encounter "zh-Hans" and "zh-Hant". Note that this confusion applies to most non-English languages, i.e. not only Chinese. EDIT-1: Tested on Mac OS, and
setLanguage("zh");
works andsetLanguage("zh-Hans");
doesn't work. EDIT-2: Tried listening to Arabic on Mac OS. For some reasonsetLanguage("ar");
makes it return possible phrases as recognized speech but no annyang commands fired (Safari 16.0) even though the string values were obviously matching. So I had to quit usingannyang.addCommands(commands);
and instead I did something like,and it worked.
With regards to the community