flutter_tts
flutter_tts copied to clipboard
Background TTS doesn't work on iOS 16.5
I believe my code is correct because it works fine on iOS 16.3 and before. But after updating my iPhone to iOS 16.5, app stop working in background, it can speak at most for around 10m only.
I notice that the other TTS apps on Appstore also have the same issue, may be it's not related to this plugin, but if someone here can help me resolve this issue, I'm really appreciate!
https://github.com/khjde1207/flutter_tts/blob/14b3676b0a49531d2b270a0f669cda0c0ca739da/ios/Classes/SwiftFlutterTtsPlugin.swift#L305
I also worried a lot about that problem. Call the reset function. Check if this solves the problem.
flutter_tts:
git:
url: https://github.com/khjde1207/flutter_tts.git
var tmpCnt = 0;
...
..
.
await tts.speak(speakText);
if(tmpCnt > 20){
tts.reset();
tmpCnt = 0;
}
tmpCnt++;
Background TTS doesn't work on iOS 16.4