[iOS] Add additional `quality` field to return value of `getVoices` to distinguish different voices
🚀 Feature Requests
- Add additional
qualityfield to the map returned bygetVoicesfor identification of voices.
Contextualize the feature
-
For now, we cannot distinguish two voices of the same name when we install the enhanced version of voice in iOS.
-
If we install the additional voices of the same name with different qualities (normal, enhanced, and premium), and call the
getVoicesfunction, we cannot distinguish the voices of the same name.
Reproduction steps
-
Settings > Accessibility > Spoken Content > Voices > Install additional voices with different qualities
-
Then, calling the
getVoicesreturns map containing indistinguishable entries of voices.
Describe the feature
- Adding an additional field describing
qualitywould help. iOS'sAVSpeechSynthesisVoiceclass has quality field, so I think we can use that. (iOS enum values: default, enhanced, premium) - Android's API also provide quality field too. (Android values: QUALITY_VERY_HIGH, QUALITY_HIGH, QUALITY_NORMAL, QUALITY_LOW, QUALITY_VERY_LOW)
- Web API does not provide quality field.
Platforms affected (mark all that apply)
- [x] :iphone: iOS
- [x] :robot: Android (maybe)
I'm able to discover premium/enhanced voices via getVoices and select them appropriately on an iPhone X running iOS 16.6.
For example, after installing Susan (enhanced), getVoices returns:
Susan (Enhanced), locale: en-US
From there, you can do
flutterTTS.setVoice({"name": 'Susan (Enhanced)', "locale":'en-US'});