0
AVSpeechsynthesizer與en-us語音是「A」的發音是「Capital A」,但只是想要「A」怎麼辦?AVSpeechSynthesizer Text-To-Speech
AVSpeechsynthesizer與en-us語音是「A」的發音是「Capital A」,但只是想要「A」怎麼辦?AVSpeechSynthesizer Text-To-Speech
這隻有當字符串中的單個字符發生,
您可以使用此檢查的解決方法,如果字符串的lenght爲1比它轉換爲小寫的字符串,
NSString *stringToUtter = @"A";
if (stringToUtter.length==1) {
stringToUtter = [stringToUtter lowercaseString];
}
AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:stringToUtter];
utterance.rate = AVSpeechUtteranceMinimumSpeechRate;
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-us"];
[self.synthesizer speakUtterance:utterance];
感謝you.its爲我工作 –