speak method
Speaks the given text aloud
- Automatically stops any existing speech first
- Updates isSpeaking flag
Implementation
Future<void> speak(String text) async {
await stop(); // ensure no overlap
_isSpeaking = true;
await _tts.speak(text);
}