title: Cancel a speechrecognizer task
body: <p>I have a WP8 app, which uses the UI-less version of the <code>SpeechRecognizer</code>. I use the following code:</p>
  
  <pre><code>string[] commands = { "Shoot" };
  recognizer = new SpeechRecognizer();
  await speechOutput.SpeakTextAsync("You can say Shoot.");
  recognizer.Grammars.AddGrammarFromList("captureCommands", commands);
  SpeechRecognitionResult result = await recognizer.RecognizeAsync();
  
  if (result.Text == "Shoot")
     cam.CaptureImage();
  </code></pre>
  
  <p>This prompts the user in both speech and on-screen text that he can say "Shoot" to take a photo. Three other options are:</p>
  
  <ol>
  <li>Tap the screen to shoot</li>
  <li>Click the shoot button in the <code>ApplicationBar</code></li>
  <li>Click the a button on the <code>ApplicationBar</code> to choose from the photo library</li>
  </ol>
  
  <p>In all three cases I would like to cancel the speech recognizer task.
  I tried removing the <code>await</code> and casting the <code>IAsyncOperation&lt;SpeechRecognitionResult&gt;</code> to a <code>Task&lt;SpeechRecognitionResult&gt;</code>, but since I don't create the task and the method does not take a cancellation token, I don't know how to cancel it, even now that I have the task object.</p>
  
  <p>If I don't cancel the task and navigate away from the page, I get an App level exception. Is there a way I can explicitly cancel the task or awaited operation?</p>