objective c - iOS - pause AVSpeech while reading a specific word -


i'm working on app reads text in uitextfield using avspeech , i'm trying pause reading when reads specific word, example reading this awesome. , want pause reading 2 seconds when reads is , complete reading. here code read string.

avspeechsynthesizer *synth = [[avspeechsynthesizer alloc] init]; avspeechutterance *utterance = [[avspeechutterance alloc] initwithstring:@"this awesome"]; utterance.rate = 0.15; utterance.voice = [avspeechsynthesisvoice voicewithlanguage:@"en-us"]; [synth speakutterance:utterance]; 

thanks

separate utterance string on occurrences of "is" , put components in array. read each string in array in order sleep(2) in between. keep in mind sleeping on main thread disable ui interactions.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -