Closed AaEll closed 5 months ago
I think you're on the wrong forum. You're looking for the closely related project text to speech, this is the speech to text project. Pretty confusing naming, sorry about that. Basically we listen when you talk, they talk when you tell them what to say. Good luck getting an answer!
I understand, the issue comes when using both libraries together.
flutterTts.speak('this sentence');
Works as intended, BUT this does not work
await speechToText.listen(); await speechToText.cancel(); // OR speechToText.stop(); flutterTts.speak('this sentence');
I think you need to wait for the status callback from STT to report that it has stopped listening before trying to use the sound system again. Let me know if that helps.
Expected behavior: flutterTts.speak('this sentence');
will result in hearing the spoken sentence
Observed behavior flutterTts.speak('this sentence');
no sound is output
Flutter Doctor [✓] Flutter (Channel stable, 3.10.6, on macOS 13.5.1 22G90 darwin-arm64, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) [✓] Xcode - develop for iOS and macOS (Xcode 14.3.1) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.2) [✓] VS Code (version 1.81.1) [✓] Connected device (3 available) [✓] Network resources
Device IPhone 14 Simulator on Mac