S&box Wiki

Revision Difference

Speech_Recognition#546282

<cat>Code.Misc</cat>⤶ <title>Speech Recognition</title>⤶ ⤶ The Speech Recognition API functionality is currently limited to two simple method calls. It may potentially be expanded in the future to support complex custom grammar trees.⤶ ⤶ # Usage⤶ ⤶ ## Generic Speech⤶ ⤶ If you want to listen for any speech you can use the below method. *It should be noted that this method yields a low accuracy result, and isn't perfect. You should search the returned string for keywords.*⤶ ⤶ ```csharp⤶ SpeechRecognition.Listen( ( output ) => Log.Info( output ) );⤶ ```⤶ ⤶ ## Phrases⤶ ⤶ ```csharp⤶ var choices = new string[] {⤶ "Jump",⤶ "Move Left",⤶ "Move Right"⤶ };⤶ ⤶ SpeechRecognition.Listen( ( output ) => Log.Info( output ), choices );⤶ ```