Skip to content
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

add locale defaulting for SpeechRecognition and support check method #1468

Merged
merged 3 commits into from
Jul 17, 2021

Conversation

oshi97
Copy link
Contributor

@oshi97 oshi97 commented Jul 15, 2021

This commit adds a method to handle locale defaulting on microsoft edge.
Chrome and Safari both have nice handling for strange locales like en_FAKE.
Edge is more sensitive, and will throw an error if the locale is not one
of its specific supported ones, or if the locale uses underscores instead of dashes.

The list of locales supported in edge was generated programmatically using a script.
There is documentation for the list of locales supported by Azure's Speech service,
but I could not find anything saying that the SpeechRecognition implementation on Edge
uses this service directly (though it seems to be the case).

J=SLAP-1441
TEST=manual,auto

tested the isMicrosoftEdge() function on different browsers by exposing it on ANSWERS
did the same thing with transformSpeechRecognitionLocaleForEdge()

This commit adds a method to handle locale defaulting on microsoft edge.
Chrome and Safari both have nice handling for strange locales like en_FAKE.
Edge is more sensitive, and will throw an error if the locale is not one
of its specific supported ones, or if the locale uses underscores instead of dashes.

The list of locales supported in edge was generated programmatically using a script.
There is documentation for the list of locales supported by Azure's Speech service,
but I could not find anything saying that the SpeechRecognition implementation on Edge
uses this service directly (though it seems to be the case).

J=SLAP-1441
TEST=manual,auto

tested the isMicrosoftEdge() function on different browsers by exposing it on ANSWERS
did the same thing with transformSpeechRecognitionLocaleForEdge()
@coveralls
Copy link

coveralls commented Jul 15, 2021

Coverage Status

Coverage increased (+0.2%) to 59.458% when pulling 94cefe8 on dev/speech-recognition-check into da7a538 on develop.

@oshi97 oshi97 requested a review from cea2aj July 16, 2021 14:18
@oshi97 oshi97 merged commit e4cccdc into develop Jul 17, 2021
@oshi97 oshi97 deleted the dev/speech-recognition-check branch July 17, 2021 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants