Post

Replies

Boosts

Views

Activity

Creating a list of voices available by locale
I'm trying to create a list that users can pick for the voice they want to use in my app. The code below works for US but if I change my locale settings to any other country, it fails to load any available voices even though I have downloaded other for other countries.. func voices() -> [String] {          AVSpeechSynthesisVoice.speechVoices().filter { $0.language == NSLocale.current.voiceLanguage }.map { $0.name }                    // AVSpeechSynthesisVoice.speechVoices().map { $0.name }     } If I list all voices available, I can select the voices for other countries that are loaded.
3
0
1.3k
Nov ’22