OGeek|极客世界-中国程序员成长平台

标题: ios - Apple Watch/WatchKit 语音合成器 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 06:31
标题: ios - Apple Watch/WatchKit 语音合成器

有谁知道是否可以访问 Apple Watch 的内置语音合成器?

对于我的 iOS 主应用,我使用了 AVSpeechSynthesizer,如下所示:

AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:theSpeech]; 
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage"en-GB"]; 

这很完美,但相同的代码在 WatchKit 扩展中不起作用。



Best Answer-推荐答案


根据 development forums 中的答案,目前似乎无法直接在 Apple Watch 上播放音频。

WatchKit 扩展中合成语音的播放将在 iPhone 上进行。这可能不是理想的用户体验。

关于ios - Apple Watch/WatchKit 语音合成器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29755733/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4