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
.
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);
}
来源:https://stackoverflow.com/questions/20944611/does-in-ios-7-0-avspeechsynthesizer-have-us-male-voice