interrupting speech

Home Forums OpenEars interrupting speech

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

  • Author
    Posts
  • #12124
    cyberhoops
    Participant

    This is probably on the forum somewhere, but I can’t seem to find it. Here is my question:

    I have an app where TTS is used to prompt the user for input. It all works fine until the user gets to the next prompt before the previous TTS output is done. In that case it never says the next statement.

    Is there a way to break off the current “say” command and then start another one?
    I see the the user can interrupt the current TTS output, but can the app interrupt?

    Side note: Great tool. It was easy to install and worked the first time.

    #12159
    Halle Winkler
    Politepix

    Side note: Great tool. It was easy to install and worked the first time.

    Thanks! Always nice to hear. Hmm, this is more something that I’ve thought of as being solvable via UI (for instance, however you signal the user that you are listening, don’t signal that when the app is talking) but I can definitely see the advantage to being able to stop playback programmatically.

    This would really not be hard for you to hack in quickly, because you are only trying to call FliteController’s method interruptTalking directly. You’d just need to check whether FliteController exists and if so, call interruptTalking.

    If you wanted to bring the complete OpenEars architecture to bear on it so everything is nicely decoupled and standard, you could create a new OpenEarsEventsObserver delegate method (fliteSpeechRequestedToInterruptTalking might be a self-describing name) and look at the various examples of how notifications are sent to OpenEarsEventsObserver throughout the framework to see how to signal it when you want to request that playing speech is interrupted (presumably this would happen as a result of a new method for PocketsphinxController which could be named something like “interruptTalking”). Then you can add the new delegate callback to FliteController since it already inherits OpenEarsEventsObserver and when it is called, call interruptTalking. If/when I add this feature it will look something like that. The advantage is that the parts of the framework can remain ignorant of each other’s status.

    #12536
    cyberhoops
    Participant

    Interrupt talking worked perfectly. I will look into the observer method, but for now I have exactly what I needed.

    #12537
    Halle Winkler
    Politepix

    Super, glad it is working.

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