Created
July 2, 2016 06:45
-
-
Save flushpot1125/88cdd5c5aeeabd50d5f06bebb27c7abd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case ActivationKind.VoiceCommand: | |
var commandArgs = args as VoiceCommandActivatedEventArgs; | |
SpeechRecognitionResult speechRecognitionResult = commandArgs.Result; | |
string voiceCommandName = speechRecognitionResult.RulePath[0]; | |
switch (voiceCommandName) | |
{ | |
case "startPlay": | |
{ | |
break; | |
} | |
case "checkScore": | |
if (speechRecognitionResult.SemanticInterpretation.Properties.ContainsKey("message")) | |
{ | |
string message = speechRecognitionResult.SemanticInterpretation.Properties["message"][0]; | |
} | |
break; | |
} | |
break; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Original source is here
https://digitalerr0r.wordpress.com/2015/10/21/voice-activating-your-windows-10-games-using-speech-synthesis-voice-recognition-and-cortana/