-
Notifications
You must be signed in to change notification settings - Fork 7
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
update edge supported locales for voice search #1519
update edge supported locales for voice search #1519
Conversation
Ran my codepen that brute force checks locales on edge, which works by by turning on speech recognition for 10s, and adding the locale to a list if a 'network' occurs. After 10s, the speech recognition is aborted and a 'no-speech' error is expected. Also added a zh-cn and zh-tw to the supported locales list, even though they're not currently locales the SDK has built in, in case a user manually supplies these locales. J=SLAP-1532 TEST=manual,auto manually test a number of the locales (~a third of them)
'pt-br', | ||
'pt-pt', | ||
'sv-se', | ||
'zh-hans-cn', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just confirming 'zh-hans-sg` and 'zh-hant-mo' aren't supported?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they are not, you can very quickly test them here https://codepen.io/oshi97/pen/RwVKKzB
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or by hacking the searchbar's SpeechRecognition instance through dev tools with ANSWERS.components._activeComponents.find( // find the searchbar and go through its instance variables
if (modifier) { | ||
return formatLocaleForEdge(language, modifier); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If a locale isn't in the compatibility list but it has a modifier, we return it? I would expect that if the locale isn't in the compatibility list, we return just the language, not a language and modifier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If zh-hans-bob isn't supported, we can return zh-hans instead of just zh
by default edge will interpret zh on its own as zh-hans, so this only matters for zh-hant-[unsupported-region]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alright, got it
Ran my codepen that brute force checks locales on edge, which works by by turning on speech recognition for 10s, and adding the locale to a list if a 'network' occurs. After 10s, the speech recognition is aborted and a 'no-speech' error is expected. Also added a zh-cn and zh-tw to the supported locales list, even though they're not currently locales the SDK has built in, in case a user manually supplies these locales. J=SLAP-1532 TEST=manual,auto manually test a number of the locales (~a third of them)
Ran my codepen that brute force checks locales on edge, which works by
by turning on speech recognition for 10s, and adding the locale
to a list if a 'network' occurs. After 10s, the speech recognition
is aborted and a 'no-speech' error is expected.
Also added a zh-cn and zh-tw to the supported locales list, even
though they're not currently locales the SDK has built in, in case
a user manually supplies these locales.
J=SLAP-1532
TEST=manual,auto
manually test a number of the locales (~a third of them)