Services Plugins FAQs

Voice Recognition Plug-In Help - trigger words gone rogue

Hi there - let me start by saying I’m new and have no experience with programming or code. But I have an insatiable passion to get my project to work, and so here I am.

I am open to learning and have had great success with bubble.io and Zeroqode’s Voice Recognition plugin until now. Here’s the challenge I’m facing:

I’m creating a “choose your own adventure” that is controlled by the user’s voice. A lot of the trigger words for the choice intervals in the story are the same, such as “yes” and “no” (and variants thereof).

If the user comes to a choice interval and responds with a trigger word that has not been programmed for that interval, but has been set up for an earlier part of the story, the app will play the earlier part of the story in response.

I have tried killing the mic/listening. I have tried stopping all the previous audio.

Is there a way to make sure the audio meant for earlier intervals does not play in response to any intervals that come after it?

Thank you so much for helping!

Doyle

Hello @doyleholz!
Thanks for reaching out.

This kind of functionality already relates to the Bubble platform itself, as the plugin allows only to return a word or a phrase.
As a general direction, allow me to recommend using the workflow steps conditionals and custom states for checking if certain workflow (keyword) already happened or not.
Some of the examples with such functionality can be found on our plugin demo editor page: in-app-voice-control | Bubble Editor

Example:

Hope this helps in a way.

Please let me know if you have any other plugin-related questions that I can help with.

THanks Diana, I have already used the workflow conditions to set up the correct parameters for trigger words associated with their respective responses.

I do not know how to set up custom states - perhaps this is the answer.

I’d like the app to “forget” the audio files after the story has progressed beyond that choice point. Instead, they stay active and sometimes play later in the story when they’re not supposed to.

I’ve already tried “killing the mic” after that choice is over, and everything else I can think of. The audio file stays active anyway and occasionally plays by accident later in the story because the user said one of its trigger words.

Hi, @doyleholz!

Instead of making the app “forget” the audio files after the story has progressed, we could try and make sure the page “sticks” with that particular (active) part of the story.

Setting a state to the page could be the answer to that.

First, we should set a state with the name of the question/step the user is currently on. Then, we would need to create events triggered by the “Yes”/“No” words (or variations of it), which are returned by the plugin, with an “ONLY WHEN” condition, whilst the condition itself contains the state.

I’ll try to break it down and make it less confusing with an example:

  1. When the user gets to Question/Choice Point #1 – “Take the road to the forest?” set the page state as “question one”.

  2. Create an event "when plugin returns “Yes”, do … (ex: continue to the next story), “ONLY WHEN” the state of the page is “question one”.

  3. When the user is on Question/Choice Point #2 – “Avoid the forest road?” - set the page state as “question two”.

  4. Create an event "when plugin returns “Yes”, do … (ex: skip to last part of the story) “ONLY WHEN” the state of the page is “question two”.

By doing this, we ensure that the action needs to meet very specific conditions (the state of the page/that particular choice point) in order to be triggered.

I hope this helps.

Ooooh that sounds like it’s the answer!! I will try it out.

Thank you for taking the time to explain so well.

1 Like

You’re welcome, @doyleholz! I hope this helps you out.

Have a Happy New Year! :christmas_tree:

OMG I think it worked!!! Well, I have to set the state of the page back to “no” before I set the next state of the page to “yes”, and I’ve only set up and tested the first two choice intervals. So far, so good. I will keep you posted.

2 Likes

Awesome @doyleholz! I’m glad this is working out. Let me know if you need help along the way!
Happy Holidays! :christmas_tree:

You are the best, thank you!

2 Likes