rtchat icon indicating copy to clipboard operation
rtchat copied to clipboard

[tts] ios tts and audio sources conflicts

Open juaoose opened this issue 3 years ago • 3 comments

Whenever TTS plays, it will mute and pause any audio source, forcing you to refresh audio sources.

juaoose avatar May 03 '22 18:05 juaoose

Looks like opening the web preview and unmuting it also stops TTS

juaoose avatar May 06 '22 13:05 juaoose

Do you think maybe the conflict could be resolved by using these settings for TTS?

  • flutterTts.setSharedInstance(true);
  • _tts.setIosAudioCategory(IosTextToSpeechAudioCategory.playback, ...somethingsomething) Looks like this is why TTS might not play in the background even when the plist is configured.

See https://developer.apple.com/documentation/avfaudio/avaudiosession

juaoose avatar May 06 '22 14:05 juaoose

I think it's worth a shot

kevmo314 avatar May 06 '22 15:05 kevmo314