The setVoice() method doesn't work neither in iOS 18 Simulator, neither on a real iPhone (iOS 18). The flutter_tts always speaks by a default male voice.
Also there is a "weird" types. If you call getVoices the method will return _List<_Map<Object?, Object?>> (seems it should be List<Map<String, String>>) but if later you call setVoice() it expects Map<String, String> and fails on _Map<Object?, Object?>.
Expected behavior
The voice will be switched.
Reproduction steps
Call flutterTts.getVoices and choose some suitable female voice.
Convert types to prevent an application crash: final convertedVoiceMap = Map<String, String>.from(selectedVoiceMap);.
🐛 Bug Report
Hello!
The
setVoice()
method doesn't work neither in iOS 18 Simulator, neither on a real iPhone (iOS 18). Theflutter_tts
always speaks by a default male voice.Also there is a "weird" types. If you call
getVoices
the method will return_List<_Map<Object?, Object?>>
(seems it should beList<Map<String, String>>
) but if later you callsetVoice()
it expectsMap<String, String>
and fails on_Map<Object?, Object?>
.Expected behavior
The voice will be switched.
Reproduction steps
flutterTts.getVoices
and choose some suitable female voice.final convertedVoiceMap = Map<String, String>.from(selectedVoiceMap);
.await flutterTts.setVoice(convertedVoiceMap);
.Configuration
Version: ^4.0.2
Platform: