我想在我的watchkit代码中添加AVSpeechSynthesizer
在watch kit os 2 for read Avfoundation中我该如何做,或者我需要将avfoundation转换为Mediaplayer或..
AVSpeechSynthesizer *synthesizer = [[AVSpeechSynthesizer alloc] init];
speechPaused = YES;
AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:@""];
utterance.rate = 0.15;
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:@"it_IT"];
[synthesizer speakUtterance:utterance];它在watchkit os2中的工作原理
发布于 2015-09-16 02:57:09
不是的。AVFoundation不适用于watchOS应用程序。
你可以做的最接近的事情是使用WKInterfaceMovie在你的手表应用程序中播放预先录制的音频剪辑。
来源:watchOS 2 Transition Guide: Available System Technologies
https://stackoverflow.com/questions/32167508
复制相似问题