From: Mike M. <mon...@wa...> - 2002-11-04 20:40:03
|
Well, you need to turn the microphone on (smMic on) before calling smRecognize, and you need a recognizedText callback to process the results. The recognizedWord callback is used for commands and mumbles. The call to getFirmWords returns a data structure, so you need to use the smWord access function to get the spelling. Look at http://www-124.ibm.com/developerworks/oss/cvs/tclsmapi/~checkout~/tclsmapi/scripts/dwtcl.tcl?content-type=text for an example of a simple dictation application. Mike Monkowski, IBM speech group programmer YADUNANDAN NAGARAJAIAH wrote: > I am trying to get the speech recognition engine to recognize speech. I > am unable to get the following basic example working. Could someone help > me in setup up the TCL/SMPI interface so that it can recognize speech > and print the recognized word to tcl wish console? Note that this is the > only speech related application running. > > Thanks a lot and regards, > yadu > > proc CreateSpeechObject {} { > smOpen smapi > smapi::smConnect -recognize true > > #Specify typical Vocabulary > smapi::smVocab enable text > > smapi::smRecognize > smapi::smCallback recognizedWord { puts [smapi::getFirmWords] } |