Prefer natural voices for read aloud
Rank platform voice quality and select the most natural automatic voice while keeping explicit voice choices intact. Surface natural labels, hide novelty voices in the picker, and guide Apple users to download enhanced voices when needed.
This commit is contained in:
@@ -90,7 +90,12 @@ class SpeechController extends ChangeNotifier with WidgetsBindingObserver {
|
||||
_set(SpeechState.speaking);
|
||||
return _guard(() async {
|
||||
await engine.setRate(_rate);
|
||||
await engine.setVoice(voice);
|
||||
final selected = voice ??
|
||||
bestSpeechVoice(
|
||||
await engine.voices(),
|
||||
WidgetsBinding.instance.platformDispatcher.locale.languageCode,
|
||||
);
|
||||
await engine.setVoice(selected);
|
||||
await engine.speak(document.text);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user