From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

speech recognition and manual user input

I  have a main GUI VI that contains two listboxes.  Both listboxes are selectable by the user.  Here is how I want them to interact.

 

When the VI is initialized, the first listbox will be filled with string phrases.  If the user double clicks a cell in the first listbox, the second listbox will be populated by sorting the string phrases from the first listbox to only include phrases starting with same first letter.  Next, I want the user to be able to double click one of the phrases in the second listbox or 'say' the phrase into a microphone for speech recognition.  The phrase that is double clicked in the second listbox or identified through speech recognized will then be displayed on the main GUI VI.

 

I've got my main GUI VI working such that the first listbox will populate the second listbox after the user double clicks a cell in the first listbox.  I've also got it working such that I'm able to double click the second listbox and display the phrase.  I'm using an event structure to do this thanks to some previous help from Dennis shown here.  I've also got a decent VI working based on this example that will recognize a phrase spoken based on an array of possible input phrases (grammar builder).  So I've got the pieces working independently of each other...

 

My question is how to have both the speech recognition listening and second listbox waiting for a double click for input at the same time?  I have an event structure that waits for a double click to determine which phrase from the second listbox goes in the displayed phrase, I get that part, but how to use an event structure for speech recognition too?  Do I need a button to click to start the speech recognition VI?  I don't think I want the speech recognition VI running in the background just listening in some endless loop do I?


Thanks,

 

Mike

 

0 Kudos
Message 1 of 6
(3,045 Views)
...am I forced to make the user choose between voice recognition or mouse entry?  Help!?!
0 Kudos
Message 2 of 6
(3,035 Views)

Hi,

 

It is a bit unclear what you are actually after.  Yes you could use the speach recognition in a seperate loop running as a daemon / callback or something but what is to stop you coding both bits of code in the same event structure.  You could do these in serial / parrallell just by the way you code them using dataflow.  It definitiely shouldnt be block diagram space as you can always create sub vi's.  You can deal with one of the events then create a user defined event to deal with the next process immediately after the first.

 

So to  re-iterate, i am unsure as to what exactly you are after but i gave you my best guess 🙂

 

Craig

Message Edited by craigc on 26--01-2010 07:56 AM
LabVIEW 2012
0 Kudos
Message 3 of 6
(3,017 Views)

I'm confused too, so bare with me please.

 

Generally, I'm really confused about the proper way of getting different methods of user input at the same time.

 

If I'm not mistaken, the speech recognition will have to run in some sort of loop otherwise when it matches a phrase spoken with a phrase from the grammar building input array it will quit.  I want the user to just be able to speech the next phrase after one has been recognized.  However, if a loop is running inside the event structure, it will hang inside that loop until the loop is satsified.  What if the user wants to say the heck with speech recognition at that point in time and double clicks an element in the listbox?  They can't because the speech recognition loop has not been satisfied.

 

Hope that helps...I really need some help figuring out the correct way to put this together.

 

Thanks,

 

Mike

 

0 Kudos
Message 4 of 6
(2,989 Views)

Posting to myself here...LOL

 

...does this mean I need parallel while loops?

0 Kudos
Message 5 of 6
(2,967 Views)
Yes, parallel loops would be a great option. You can have two process that will run simultaneously and let you take advantage of multicore processing. If you need to pass data between the loops you may want to use the producer consumer architecture.
0 Kudos
Message 6 of 6
(2,944 Views)