OnUtteranceProgressListener in AndroidSpeechPlayer not supported by API 14
Looks like the previous listener only fired when utterance was completed. https://developer.android.com/reference/android/speech/tts/TextToSpeech.OnUtteranceCompletedListener
For extra context:
As indicated in OP the UtteranceProgressListener used in AndroidSpeechPlayer#setInstructionListener is not supported by API 14.
What about using TextToSpeech.OnUtteranceCompletedListener (added in API level 4 Deprecated since API level 18) for API 14 and UtteranceProgressListener (added in API level 15) for API 15 and below. Isn't that possible? Am I missing something?
Adding the TextToSpeech source code for reference https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/speech/tts/TextToSpeech.java
Yea I think that should work but we will be losing onDone and onError so we'll have to find a work around for those
Yeah, I've briefly seen TextToSpeech source code and some methods return ERROR and SUCCESS so I guess we could figure something out for those cases.