Open giantss opened 3 months ago
I think you should try
`
FlutterTts flutterTts = FlutterTts();
Future
speak(String text) async { var result = await flutterTts.speak(text); if (kDebugMode) { print("Speaking started: ${result == 1 ? true : false}"); } }
stopSpeaking() async { var result = await flutterTts.stop(); if (kDebugMode) { print("Speaking started: ${result == 1 ? true : false}"); } }
@override void initState() { super.initState(); initializeTts(); }
@override void dispose() { flutterTts.stop(); super.dispose(); }`
That is the code i used and it worked for me.
@dlutton , i think this should work, it could lead to one less issue on this repo 🙂 ?
🐛 Bug Report
I received user feedback that there is no sound when playing speech synthesis on iPhone 14 Pro Max (17.5.1) (the code is executed and no errors are seen). I tried two other iPhone 15 pro (17.4.1) and iPhone 12 (17.2.1), and they can play normally. I suspect that the system version is too high. Then I upgraded the iPhone 15 pro system version to 17.6.1, and the test playback can still play. What should I do if I encounter such a problem?
Configuration
Flutter 3.19.5
flutter_tts: ^3.8.5
Platform: