How can I add / change voice voice in an iOS app quickly? I use the AVSpeechSynthesisvoice class to get voice voices

I created an application with the voice voice function using AVSpeechSynthesizer and displaying a list of languages ​​from the AVSpeechSynthesisVoice: speechVoices() function in the TableView. User can select speech language from TableView.

The next thing I wanted to achieve was to add a speech gender so that the user could switch between standard male or female voices, for example, in the Siri application. I don’t want it to be complicated, so I just looked for male or female voices by default.

The voices returned from speechVoices() have a default male or female voice specific to each voice.

Can i change this? I placed the UIPickerView page on the application settings page to choose between male and female voices.

However, I did some research, but could not find the documentation. There seems to be no such support available until the latest version of iOS.

Has anyone tried to implement such a function so far?

+7
ios swift text-to-speech speech-synthesis avspeechsynthesizer
source share

No one has answered this question yet.

See related questions:

958
How to change iOS app name?
25
Using list preferences in Android
7
Why does the voice of the speech synthesis API change when a function is run more than once?
7
How to get a list of ALL votes on iOS 9?
3
Does iOS AVSpeechSynthesizer support built-in speech commands
one
speech synthesis - How to change gender?
0
Priority in the voice of "Tips" in the voices of MS TTS?
0
JavaScript Speech to Text API for iOS users not working
0
Is it possible to make a user's voice instead of the built-in voice in TTS?
0
How can I avoid duplicating BCP-47 language code from AVSpeechSynthesisVoice: speechVoices ()?

All Articles