DanM DanM - 1 month ago 5x
Objective-C Question

Easy way to force pauses in an AVSpeechSynthesizer utterance?

I'm using

to speak a long passage. However, there are some sections of the text where I want the speaker to pause for a moment before continuing. Is there a trivial way to just, say, add some special character into the
used to create the utterance that will force a pause? Or am I going to have to split this up into several separate utterances and manually delay between them?


Try looking at AVSpeechSynthesizerDelegate's willSpeakRangeOfSpeechString:

You could check for a special character there, call pauseSpeakingAtBoundary if you find it, and then resume after a set amount of time.