I'm a newbie to IOs development. Now, I need use an "Text to speech" functionality in my apps, I found OpenEars platform for do that. But in my code, it can only speech one statement in one Class. I was search on Google but i can't found How to speech multiple statement by using OpenEars. Here Is my code :
- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
[self.oEEO setDelegate:self];
[self.teller say:@"Hello World" withVoice:self.voice];
[self.teller say:@"Hello World Again !" withVoice:self.voice];
return YES;}
oEEO is OpenEarsEventsObserver
How to teller say "Hello World Again " ? thank you for reading !
OpenEars developer here. FliteController is asynchronous and any new utterance will override the previous one, which means that if you start two utterances almost simultaneously as in your example, you will only hear the second one. What you want to do is to wait for OpenEarsEventsObserver's fliteDidFinishSpeaking method to know that the first (or the nth) speech utterance is complete so you can begin the next one. Please bring further questions to the OpenEars forums if you'd like to troubleshoot them with me.