c# - How to speech recognition from video playback? -


i have application can detect speech based on tutorial @ https://www.youtube.com/watch?v=ab9lfhdoe5u

in load event of form have following

//global variable speechrecognitionengine recengine = new speechrecognitionengine();              private void frmmain_load(object sender, eventargs e)             {                 //hide border prevent screen burnout                 this.formborderstyle = formborderstyle.none;                  choices commands = new choices();                 commands.add(new string[] { "stock", "news", "percent", "down" }); //need read company list db                 grammarbuilder gbuilder = new grammarbuilder();                 gbuilder.append(commands);                 grammar grammar = new grammar(gbuilder);                   recengine.loadgrammarasync(grammar);                  //this need help-----------                 recengine.setinputtodefaultaudiodevice();                 recengine.speechrecognized += recengine_speechrecognized;             }      //event called when word recognized     private void recengine_speechrecognized(object sender, speechrecognizedeventargs e)     {         switch (e.result.text)         {             case "stock":             messagebox.show(e.result.text);             break;              case "news":             messagebox.show(e.result.text);             break;              case "percent":             messagebox.show(e.result.text);             break;              case "down":             messagebox.show(e.result.text);             break;         }     }      //used enable recognition start     private void btnenableaudio_click(object sender, eventargs e)     {         recengine.recognizeasync(recognizemode.multiple);     } 

i read audio speakers instead of mic, if playing video i'd detect words.

does have ideas how set input device output device?


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -