【发布时间】:2019-06-17 15:09:57
【问题描述】:
我有 NSArray,里面有单词。 我想应用程序按顺序读取 tts 并在 UILabel 中打印应用程序所说的文本。 但标签上的字显示在最后一个。
我尝试过时间暂停等
for (Word * w in ttswords) {
[self speechword:w];
}
-(void)speechword:(Word*)w{
utterance = [[AVSpeechUtterance alloc] initWithString:[w.title stringByReplacingOccurrencesOfString:@"~" withString:@""]];
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-US"];
[synthesizer speakUtterance:utterance];
_lb_title.text = w.title;
}
我要一个一个执行。
【问题讨论】:
标签: objective-c text-to-speech avspeechsynthesizer