WatchKit: Can I use text to speech?

I am creating an app for a new Apple Watch. I would like to use the text to speech functionality. Right now, I'm using the old code (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];

      

In my simulator, it works correctly for hours.

I am confused because I read on several forums that it is impossible to use text to speech. I would like to know if my code works in a real Apple Watch.

Thank.

+3


source to share


2 answers


It's impossible. In general, WatchKit is pretty limited right now. Third-party developers are currently unable to play audio from the Apple Watch (Source: Apple employee via developer forum).



See here what is possible.

+1


source


According to the documentation at developer.apple.com, the AVSpeechSynthesizer API is available for watchOS 2+.



Also, as of June 9, 2017, I can verify that I can play AVSpeechUtterance on my wrist on the device itself, Series 0 Apple Watch, 38mm, which can be played from the built-in speaker or via Bluetooth headphones (BeatsX).

+1


source







All Articles