I am creating an application for the new Apple Watch. I would like to use 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 the watch.
I am confused, because I've read on several forums that it is not possible to use text-to-speech. I'd like to know if my code works in a real Apple Watch.
Thank you.
According to the documentation at developer.apple.com the AVSpeechSynthesizer API is available for watchOS 2+.
In addition, as of June 9, 2017, I can verify that I can play an AVSpeechUtterance on my wrist on an actual device, a Series 0 Apple Watch, 38mm, which can play from the built-in speaker or through bluetooth headphones (BeatsX).
This is not possible. In general, WatchKit is pretty limited right now. Third-party developers can currently not play audio from Apple Watch (Source: Apple employee via developer forum).
See here what's possible.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With