I found --
can add a small pause like the number count down:
10--9--8--7--6--5--4--3--2--1--
But I don't know how to add a long pause, for like 1 sec?
Any idea?
Even easier in Swift 3
utterance.preUtteranceDelay = 1.0
or
utterance.postUtteranceDelay = 1.0
for a one second delay assuming each number is it's own utterance (like in a loop). You'd probably have to reduce the delay slightly to take account for the actual speaking duration of each number.
For a normal delay we can add a ":" (colon) between each of the words.
eg:-
utterance = AVSpeechUtterance(string: String(format: "Time: 20 minutes: 15 seconds")
the output will ----- " Time (delay) 20 minutes (delay) 15 seconds "
AVSpeechUtterance has postUtteranceDelay properity which decides the delay. utterance.postUtteranceDelay = 1.0f; // or 1s equaivalent to NSTimeInterval
@property(nonatomic) NSTimeInterval postUtteranceDelay Description The amount of time a speech synthesizer will wait after the utterance is spoken before handling the next queued utterance.
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