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

Catch tts.getVoices error #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

whitmer
Copy link

@whitmer whitmer commented Sep 28, 2017

On Samsung Galaxy S4 there is an unexpected error that happens sometimes when users are using the Samsung default voice and tts.getVoices is called. This catches the error and notes the problem, falling back to the old approach to getting a list of locales since the voice list is not available.

Description

Added try block to catch the unexpected error. In that case of catching an error, the code falls back to the old method of getting a list of supported locales rather than just returning an empty list.

Added a local variable retrieval_error to mark the fact that there was a problem. Added a new execute option error_check which returns true if there was an error retrieving the voices and false otherwise.

Related Issue

Fixes #13
Difficult to test without a Galaxy S4. I had occasional reports of the error in my app until I added a try block to catch the offending code, then the errors went away until I re-installed my cordova plugins and forgot about the manual change I'd made.

On Samsung Galaxy S4 there is an unexpected error that happens sometimes when users are using the Samsung default voice and tts.getVoices is called. This catches the error and notes the problem, falling back to the old approach to getting a list of locales since the voice list is not available.
@macdonst macdonst self-requested a review November 30, 2017 23:34
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.

1 participant