I've been having fun with MOVI for a couple of weeks and it looks like the SentenceSets sketch is the best one to use as a starting point for my project (MOVI to MQTT to OpenHAB).
I discovered a couple of things while adapting the code and thought I'd share.
1) say("ONE") and say("one") seem to be different. The all caps case is spelled out ("o-n-e") while the lower case is "one", as expected. For most words, it doesn't make a difference but ONE and TWO are spelled out. Hmmm.
2) the String returned by getResult() has a carriage return at the end of it (might be obvious to some). This is fine except if you're using the getWord() function in the sketch as the last word always includes the <CR>. It's important if you're trying to match that last word to your known words. Maybe I'm thick but it took me an hour to notice - easy enough to trim off the <CR> for sentence->word deconstruction.
3) I'm not sure how useful the 'levenshtein' routine is for any type of word correction (for me). I've found that MOVI either nails it (returns exactly the spoken words) or it returns something that is a long way off (usually extra words but sometimes just plain wrong). So the 'levenshtein' is either zero (match) or some other number that doesn't really help make a correction. Most of my commands will be three words ("open blind three" or "main light on") so I'll need to build in some sort of routine where MOVI will ask the user things like "open which blind?" or "what would you like switched on?" when it only understand part of what is said.
I'm really enjoying the MOVI shield. I'm amazed you guys could get all this onto a single board.
Login below to reply: