I am trying to do some voice recognition via Powershell. - Just to play a bit. I have already found some information about this with help of google. But the most source code is in C#.
My Problem is the following. In C# the event handler is attached like the following:
Â Â ``new
How can I do this in Powershell? I’ve tried to do the following:
$speechRecognitionEngine``.SpeechRecognized += ``$handler
But this doesn’t work. It tells me “Property ‘SpeechRecognized’ cannot be found on this object; Make sure it exists and is settable.”
For additional Information:
- $SpeechRecognitionEngine is a object of type System.Speech.Recognition.SpeechRecognitionEngine
- engine_SpeechRecognized is a function doing something ( in easiest way to write-host “SpeechRecognzed” ).
I know about Add-Type command and that I can use C# Code within powershell with it. But that is not what I want.
Thank you for your help
EDIT: Sorry didn’t know about the new forum. This is why I posted on both.