[how to]openears multiple statement to speech

Home Forums OpenEars [how to]openears multiple statement to speech

Viewing 5 posts - 1 through 5 (of 5 total)

  • Author
    Posts
  • #1021099
    bluesun
    Participant

    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 !
    @Halle : Please tell me how to synchronize FliteController ? thank you

    #1021100
    Halle Winkler
    Politepix

    Welcome,

    Sure, my answer on Stack Overflow explained this:

    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.

    Do you have specific questions about my explanation that I can answer?

    #1021101
    bluesun
    Participant

    how to wait fliteDidFinishSpeaking ? I don’t have any ideal for that :(

    #1021103
    Halle Winkler
    Politepix

    fliteDidFinishSpeaking is an OpenEarsEventsObserver delegate method that is called when FliteController has finished speaking a phrase. There are examples of how all the OpenEarsEventsObserver delegates work in the sample app, and you can do further research on how delegate callbacks work in Objective-C if you aren’t sure how to make use of delegates. The Apple developer site has good documentation about what delegates are and how they work.

    #1021113
    bluesun
    Participant

    Thank you, Halle ! I will try :)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.