dlutton / flutter_tts

Flutter Text to Speech package
MIT License
604 stars 254 forks source link

Provide Identifier for getVoices and setVoice #518

Closed dodatw closed 2 months ago

dodatw commented 2 months ago

tts_flutter now supports getVoices to enumerate all voices on the iPhone. Enumeration records include name and locale. I hope it supports identifier.

The problem is that depending on the system language settings, many of them will get different voice names.

For example: If the system language is English, the voice profile is "Tingting": "zh_CN". If the system language is Chinese, the voice profile is "Tingting": "zh_CN". If the system language is Japanese, the voice profile is "Ting-Ting": "zh_CN". The sound has a unique identifier code com.apple.ttsbundle.Ting-Ting-compact

If tts_flutter can support Identifier when getVoices and setVoice, it can avoid the problem of different names in different system languages.

dodatw commented 2 months ago

I found it add in 4.0.0