text-to-speech - WatchKit:我可以使用文字转语音吗?

标签 text-to-speech watchkit apple-watch

我正在为新的 Apple Watch 创建一个应用程序。我想使用文本转语音功能。现在,我正在使用旧代码(iPhone):

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];

在我的模拟器中,它适用于 watch 。

我很困惑,因为我在几个论坛上读到过无法使用文本到语音转换。
我想知道我的代码是否适用于真正的 Apple Watch。

谢谢你。

最佳答案

根据文档 developer.apple.com AVSpeechSynthesizer API 可用于 watchOS 2+。

此外,截至 2017 年 6 月 9 日,我可以验证我可以在实际设备上在手腕上播放 AVSpeechUtterance,Series 0 Apple Watch,38mm,可以从内置扬声器播放或通过蓝牙耳机(BeatsX )。

关于text-to-speech - WatchKit:我可以使用文字转语音吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30144834/

相关文章:

ios - Apple Watch WatchKit 可以进行文字转语音吗?

ios - 如何使用 iOS 版 Nuance Vocalizer、Speechkit 2 检测语音结束

ios - 通过 watchConnectivity 发送一个 NSObject

swift - 在 WatchKit 中以编程方式更改行的颜色

ios - WatchKit:如何在 objC 中动态地为存储在 Nsmutablearray 中的图像设置动画

ios - 在不同重复间隔的Apple Watch上添加提醒通知

ios - 当 iPhone 上启动 GPS 跟踪时开始 Apple Watch 锻炼

javascript - 语音服务 Azure - 服务器连接失败

java - 将文本转换为音频文件,如 java 中的 .wav 或 .au

ios - 避免在 Swift 中重复元组