Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does in iOS 7.0 AVSpeechSynthesizer have US male voice?

Solution : It doesnot have US male voice


I have used AVSpeechSynthesizer framework for iOS7.0

AVSpeechUtterance *utt = [AVSpeechUtterance speechUtteranceWithString:@"Hello"]; 
if (isMale) //flag for male or female voice selected
{
    // need US male voice as en-US is providing only US female voice
    utt.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-GB"]; //UK male voice 
}
else
{
    utt.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-US"]; //US female voice
}

I need to use US male voice instead of male UK voice.

like image 832
Paresh Navadiya Avatar asked Jan 06 '14 06:01

Paresh Navadiya


1 Answers

iOS still doesn't provide US male voice. You can find all BCP-47 code of available voices

for (AVSpeechSynthesisVoice *voice in [AVSpeechSynthesisVoice speechVoices]) {
NSLog(@"%@", voice.language);
}
like image 100
Mayank Jain Avatar answered Sep 19 '22 10:09

Mayank Jain