flutter_tts icon indicating copy to clipboard operation
flutter_tts copied to clipboard

Audio Conversion Issue After iOS 17 Update: Noise and Distortion in CAF Files

Open RajaramTech opened this issue 2 years ago • 3 comments

🐛 Bug Report

Hi, I have utilized the 'synthesize to file' feature to convert specific text into an audio file in the iOS environment. Everything worked flawlessly before the iOS 17 update. However, after updating my phone to iOS 17, I have encountered an issue where the conversion is no longer producing the expected results. Instead, the output contains only noise and distortion.

I have attached one of the converted files as a reference. I am seeking your assistance in finding a workaround or resolving this issue as quickly as possible.

Expected behavior

Just like before IOS 17, I expected a perfectly converted CAF audio file.

Reproduction steps

I have implemented in the following way for IOS:

String newfileName = "tts.caf"; await flutterTts.setSharedInstance(true); await flutterTts.awaitSynthCompletion(true); await flutterTts.synthesizeToFile( "Hello World", Platform.isAndroid ? "tts.wav" : newfileName);

Configuration

Version: 3.8.3

Platform:

RajaramTech avatar Sep 22 '23 07:09 RajaramTech

I have the same problem. Function synthesizeToFile is broken on iOS 17.

manhhaiphp avatar Sep 27 '23 06:09 manhhaiphp

I don't think this is a problem with the plugin per se, I think it's just broken in iOS 17. If you google "tts synthesize ios 17 problem" you'll find various posts about it occuring independent of the programming language used.

On second note, "enhanced" and "premium" voices added through iOS settings menu appear to function correctly.

Edit: I created a pull request with a fix here: https://github.com/dlutton/flutter_tts/pull/435. Apple must've messed something up in iOS 17. Nonetheless, it can be fixed.

Colton127 avatar Oct 26 '23 16:10 Colton127

Thank you. It is working in my iphone 11. I dint get a chance to check other real devices. Hopefully, it will work on other devices too.

RajaramTech avatar Nov 16 '23 18:11 RajaramTech