Also, if using start and end offsets inside of setProgressHandler(), you'll need to keep a track of them if using pause since they will update once the new text is created when speak is called after being paused.
Due to using onRangeStart(), pause works on SDK versions >= 26. We use that index to create a new text the next time speak is invoked. We utilize the native onRangeStart() method to determine the index of start when pause is invoked. Īndroid TTS does not support the pause function natively, so we have implemented a work around.
In the queries elements of their manifest. minSdkVersion 21Īpps targeting Android 11 that use text-to-speech shouldĭeclare _ACTION_TTS_SERVICE Android #Ĭhange the minimum Android sdk version to 21 (or higher) in your android/app/adle file. A flutter text to speech plugin (Swift,Kotlin) Features #