Shall i use fliteDidFinishSpeaking to read the subsequent lines of test in my ap

Home Forums OpenEars Shall i use fliteDidFinishSpeaking to read the subsequent lines of test in my ap

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

  • Author
    Posts
  • #1022891
    krishtelco
    Participant

    I am creating an iOS app that needs to read(test to speech) several lines of text. i am calling fliteController say method for the first line of text.
    it is reading the text.
    If call the say method for the second line of text it is not reading?

    So shall i include the say method in fliteDidFinishSpeaking
    to read the subsequent lines?

    thanks in advance for your kind help

    #1022892
    Halle Winkler
    Politepix

    Welcome,

    That’s exactly right – you need to wait until you get the callback in fliteDidFinishSpeaking in order to know one line of speech is complete, before you can begin the next one.

    #1022893
    krishtelco
    Participant

    Hi Halle Thanks for your kind response. But some people said we should not write code (that to fetch next text and call “say” in flitedidfinishsieaking because it is delegated callback ?

    #1022895
    Halle Winkler
    Politepix

    You can naturally use the callback in order to call a method responsible for advancing your speech utterances through a queue or any business logic that you prefer for that. I guess I don’t really understand the idea of avoiding using the callback in order to trigger an event based on the information shared by the callback about the status of an asynchronous API. If that were dangerous, it wouldn’t be possible to react to the status of any of Apple’s async APIs which deliver status information through delegates (for example audio playback or networking APIs).

    #1022896
    krishtelco
    Participant

    Hi Halle thanking you for your wonderful help and response. Really a great help

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