Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WatchKit: Can I use text-to-speech?

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.

like image 710
Diego Avatar asked Oct 19 '25 15:10

Diego


2 Answers

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).

like image 156
Jared Updike Avatar answered Oct 22 '25 07:10

Jared Updike


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.

like image 32
vomako Avatar answered Oct 22 '25 05:10

vomako



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!