Skip to content

Instantly share code, notes, and snippets.

@flushpot1125
Created July 2, 2016 06:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flushpot1125/88cdd5c5aeeabd50d5f06bebb27c7abd to your computer and use it in GitHub Desktop.
Save flushpot1125/88cdd5c5aeeabd50d5f06bebb27c7abd to your computer and use it in GitHub Desktop.
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