Detect if NeatSpeech is speaking

Home Forums OpenEars plugins Detect if NeatSpeech is speaking

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

  • Author
    Posts
  • #1020720
    AlexMindSpace
    Participant

    I’m trying to prevent a word from being added to the speech queue while the current word is being spoken. I know there is speechInProgress but unless I’m using it wrong then this works only with flitevoice(?) not NeatSpeech

    Is there another way to do this that I’m missing?

    #1020723
    Halle Winkler
    Politepix

    Welcome,

    Speech is in progress is you have initiated speech and there hasn’t been a callback yet to fliteDidFinishSpeaking, so you could track it by keeping track of that state.

    #1020779
    AlexMindSpace
    Participant

    Thanks for getting back to me.

    I’m relatively new to Obj-C. How do you mean for me to keep track of whether or not there has been a callback to fliteDidFinishSpeaking. I mean the fliteDidFinishSpeaking method returns void and I’m not sure how you trak whether or not the method has been called.

    If you could clarify that’d be great

    #1020780
    Halle Winkler
    Politepix

    Hi Alex,

    fliteDidFinishSpeaking and all of the methods of OpenEarsEventsObserver are delegate methods, so take a look at the search results for “delegate methods in Objective-C” to learn about how they work (there are also examples of implementing OpenEars’ delegate methods specifically in the sample app, but the use of delegates is an important tool in Objective-C programming so it will be really helpful to your adjustment to the new language to check in to the underlying principle). In Objective-C, delegates are basically how callbacks work in an object-oriented way, as well as serving some other functions that allow good object-oriented principles to be followed in software design. The initial learning curve is a little tricky but they are one of the most useful tools for design in our language and are an important part of all of the asynchronous APIs from Apple, not just OpenEars.

    #1020847
    AlexMindSpace
    Participant

    That worked great, thanks

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