flutter_tts icon indicating copy to clipboard operation
flutter_tts copied to clipboard

Background TTS doesn't work on iOS 16.5

Open lecanhhiep opened this issue 1 year ago • 2 comments

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!

lecanhhiep avatar Jun 24 '23 23:06 lecanhhiep

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++;
 

khjde1207 avatar Sep 05 '23 10:09 khjde1207

Background TTS doesn't work on iOS 16.4

niumj avatar Mar 01 '24 08:03 niumj