Is it possible to use text-to-speech using the Apple Watch WatchKit?

Can I use Text-To-Speech in WatchKit? Basically, I want to play text-based audio on an Apple Watch. How could I achieve this?

+4
source share
2 answers

Yes, now you can get the class from AVSpeechSynthesizerDelegate and add

import AVFoundation

var synth:AVSpeechSynthesizer = AVSpeechSynthesizer.init()
synth.delegate = self
synth.speak(utterance)
+4
source

No, you cannot play audio directly from the Apple Watch speaker.

-1
source

Source: https://habr.com/ru/post/1605708/


All Articles