我正在开发一个在UITextField
using中读取文本的应用程序,AVSpeech
并且我试图在它读取特定单词时暂停阅读,例如它正在阅读这个This is awesome.
,我希望它在阅读时暂停阅读 2 秒钟is
然后完成阅读。这是我读取字符串的代码。
AVSpeechSynthesizer *synth = [[AVSpeechSynthesizer alloc] init];
AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:@"This is awesome"];
utterance.rate = 0.15;
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"en-us"];
[synth speakUtterance:utterance];
谢谢