2014-01-06 2 views
11

솔루션 : 그것은 내가 대신 male UK voiceUS male voice를 사용할 필요가 iOS7.0iOS 7.0 AVSpeechSynthesizer에 미국 남성 음성이 있습니까?

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 
} 

에 대한 AVSpeechSynthesizerframework을 사용했다 US male voice


이 doesnot.

+0

그렇다면 문제는 간단 할 수 있습니까? – Retro

+0

남성 영국 음성 대신 미국 남성 음성을 사용해야합니다. –

+1

'en-GB'는 영국 남성 음성으로 사용하는 대신 영어 음성으로 남성 음성으로 받아 들여야한다고 생각합니다. 확실하지는 않지만 애플이 다른 미국 남성 목소리를 제공하지 않아서 우리가 생각할 수있는 것입니다. – Bhavin

답변

2

iOS는 여전히 미국 남성 음성을 제공하지 않습니다. 사용 가능한 음성의 BCP-47 코드를 모두 찾을 수 있습니다.

for (AVSpeechSynthesisVoice *voice in [AVSpeechSynthesisVoice speechVoices]) { 
NSLog(@"%@", voice.language); 
} 
+0

솔루션은 질문 만 제공됩니다. –