fix(voice-call): Improve async handling and state management
Refactor voice call service to handle asynchronous operations more precisely. Update method signatures to be async, use unawaited for non-blocking calls, and ensure proper state reset between sessions. Improve error handling and resource management for voice input and text-to-speech services.
This commit is contained in:
@@ -149,6 +149,9 @@ class TextToSpeechService {
|
||||
Future<void> dispose() async {
|
||||
await _eventSubscription?.cancel();
|
||||
_eventSubscription = null;
|
||||
|
||||
// Reset the singleton state for next session
|
||||
await TtsManager.instance.reset();
|
||||
}
|
||||
|
||||
/// Updates TTS settings.
|
||||
|
||||
Reference in New Issue
Block a user