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:
2026-11-13 15:59:35 +00:00
parent eeb07e5645
commit 3164b7c8df
10 changed files with 424 additions and 35 deletions
@@ -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);
});
}