Members | Sign In
Legacy MOVI User Community Forum (readonly) > MOVI Question & Answers

Movi only recognizing first sentence

posted Jun 06, 2016 13:06:08 by BrandonMoore
Hello there. I am currently using the MOVI board to create a voice automation system for a motorhome. However, I am having some problems. As of right now I have MOVI doing 8 different actions. Below are the exact actions I am performing:

addSentence("Turn on door lights");
addSentence("Turn off door lights");
addSentence("Turn on porch lights");
addSentence("Turn off porch lights");
addSentence("Turn on road lights");
addSentence("Turn off road lights");
addSentence("Turn on cargo lights");
addSentence("Turn off cargo lights");

Now, I noticed whenever I started implementing the porch, road, and cargo light sentences (I started with just the door lights to get the system working), the MOVI would always activate the door lights output no matter what I said. For example, if I speak "Turn on porch lights", the serial monitor will write that it heard "Turn on door lights" or something to that extent. I can even just say "porch" and it will tell me it heard "door". Same goes for the cargo and road lights. I am not sure what the problem is here, or how I should go about fixing it, but some advice would be appreciated. Thank you.
page   1
5 replies
GeraldFriedland said Jun 07, 2016 20:48:45

To debug your situation:
1) Have you taken a look at the raw words MOVIEvent[201]? Are you saying MOVI recognizes "DOOR" when you say "PORCH"?
If so, the first thing to do is to enter the command "VOCABULARY" on the Serial Monitor and check that all your sentences have been trained. If not, you probably forgot the recognizer.train(). Otherwise, see 2)
2) If you train just the words "door", "porch", "road", and "cargo" (each as a sentence), does the problem then persists?

BrandonMoore said Jun 08, 2016 16:04:35
It turns out that MOVI wasn't even learning all the commands, I had to use the monitor to teach them manually. Any idea why it would not train the sentences by itself? I used recognizer.train().
GeraldFriedland said Jun 09, 2016 00:46:55
There are two reasons this could happen.
1) You run out of memory. This happens fairly quickly on an UNO board. To prevent that from happening, all you need to do is use the F macro. So do this:
addSentence(F("Turn on door lights")); 
addSentence(F("Turn off door lights")); 
addSentence(F("Turn on porch lights")); 
addSentence(F("Turn off porch lights")); 
addSentence(F("Turn on road lights")); 
addSentence(F("Turn off road lights")); 
addSentence(F("Turn on cargo lights")); 
addSentence(F("Turn off cargo lights")); 

and any other string you will be using in your program.
2) If that's not it: Are you using the latest version of the MOVI library. Older version had a bug where the serial connection would sometimes be unstable. So please use v1.03

Let me know if any of this was helpful. If not, I need to think about it a little more...
BrandonMoore said Jun 09, 2016 11:19:21
I actually figured it out, and I was already using the F() macro. I had my setThreshold command between my recognizer.init() and my first addSentence() command. I moved setThreshold to the end after recognizer.train() and it worked perfectly. Simple mistake on my part. Thanks for your help.
GeraldFriedland said Jun 10, 2016 03:48:57
I'll file this as a bug report because it should be totally fine to do a setThreshold() before train().
Login below to reply: