我正在爲新Apple Watch創建應用程序。我想使用文本到語音功能。現在,我使用的舊代碼(iPhone):WatchKit:我可以使用文本到語音嗎?
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];
在我模擬器它正常手錶。
我很困惑,因爲我已經在幾個論壇上看過,它不可能使用文本到語音轉換。 我想知道我的代碼是否在真實 Apple Watch中工作。
謝謝。
嘿,你是否設法使這項工作? –