-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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 and report TTS errors #5561
Conversation
implement onError() to report a Toast with some hints to the user in case the TTS engine returns an error. From API 21 upwards we would also have the error code available for further details on what happened.
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.
Too bad that we don't get the error code. Theoretically it should be available on higher APIs, however when I inspected the Android source code, it seemed that the non-deprecated callback is never called. Maybe I'm just looking in the wrong place? :/
I guess I ended up at the same location than you when checking the source code. This was the point when I told to myself "I don't understand the API deprecation concept of Android". The error codes are probably not that important anyways. At this point you already know that the problem happened outside of the scope of Anki. If simply re-installing the TTS does not help, then Android TTS needs to be debugged. Maybe attaching the phone to a PC and reading the logs with ADB is the way to go then. But as said, this is beyond the scope of Anki, as TTS is globally broken. |
In case TTS output fails display a Snackbar with an error message and a help link pointing to the FAQ with recovery instructions.
please review again. Travis fail does not sound related to my change. |
agreed re: Travis - that's an area of current work for me, I'm manually shepherding CI status on this PR to both see what flakes on it and make sure it goes green |
Travis was suffering through a "Major Outage" on their Google Compute Engine services, which is where our builds are routed in their system, complicating matters. CI's green now |
* catch and report TTS errors implement onError() to report a Toast with some hints to the user in case the TTS engine returns an error. From API 21 upwards we would also have the error code available for further details on what happened. * Display Snackbar for failing TTS In case TTS output fails display a Snackbar with an error message and a help link pointing to the FAQ with recovery instructions.
Purpose / Description
implement onError() to report a Toast with some hints to the user
in case the TTS engine returns an error.
From API 21 upwards we would also have the error code available
for further details on what happened.
Fixes
fixes #5468
Approach
report a Toast
How Has This Been Tested?
Tested on emulator
Checklist
if
statements)