"Cortana, what's new?" "There are new code samples..."

Description

You're building a Windows Phone app, you've seen the cool things Cortana can do, like speak Klingon, so of course, you want to integrate Cortana into your next app. But how?

Funny you should...

Cortana Integration and Speech Recognition: New Code Samples

The blog post was authored by Steve White, Senior Content Developer, Content Publication Team

One of the strengths of Cortana is its ability to understand and respond to voice commands. The Windows Runtime API enables you to integrate your app with Cortana and make use of Cortana’s voice commands, speech recognition, and speech synthesis (text-to-speech, or TTS).

It is also possible to voice-enable your apps by implementing speech recognition and TTS capabilities.

We have just published a set of new sample apps that show you how to do these integrations. These two samples are for Windows Phone 8.1, and they complement the existing samples for Windows Phone Silverlight.

Let’s take a look at them…

  • Voice Commands Quickstart
  • Speech Recognition and TTS Quickstart
  • More Cortana and speech recognition resources

... [Click through]

Voice Commands Quickstart

This sample demonstrates how to integrate your app with Cortana voice commands. It covers authoring and installing a Voice Command Definition file, and shows how your app can respond to being activated by Cortana.

...

This sample demonstrates how to use voice commands with Cortana in your Windows Phone Store app.

The sample demonstrates these features and aspects: 

  • Authoring and configuring your Voice Command Definition (VCD) file.
  • Installing the VCD file on app launch.
  • Handling your app being activated by a voice command.
  • Determining whether the voice command that activated your app was actually spoken, or whether it was typed in as text.
  • Navigating to a page in your app based on parameters in a voice command.
  • Using a phrase topic to allow dictation to be part of a voice command.
  • Using a phrase topic with a subject (in this case, movie titles) in a voice command, to further refine the relevance of speech recognition results.
  • Using text-to-speech (TTS) to give audible feedback about the voice command; but only if the voice command was spoken.
  • Programmatically redefining a phrase list. 

Note  Building this sample requires Windows 8.1 and Microsoft Visual Studio 2013 with Update 2 or later.

...

image

Speech Recognition and TTS Quickstart

Demonstrates using speech recognition and text-to-speech (TTS). Covers recognition with and without UI, predefined constraints, list constraints, and SRGS grammar file constraints. Shows how to offer the user a list of installed voices and have that voice read back some text.

This sample demonstrates how to use speech recognition and text-to-speech (TTS) features in your Windows Phone Store app.

The sample demonstrates these features and aspects: 

  • Recognizing with default UI, using a predefined dictation grammar constraint, so that you can freely dictate a short message.
  • Recognizing with default UI, using a predefined web search grammar constraint, so that you can speak web search keywords.
  • Recognizing with default UI, using a list constraint, so that the words or phrases to listen for are defined by a list you supply.
  • Recognizing with default UI, using a SRGS grammar file constraint, so that the words or phrases to listen for are defined by a grammar you supply.
  • Recognizing continuously, with custom UI, using a SRGS grammar file constraint. You can speak phrases from the grammar continuously and then end the recognition session with a particular word or phrase.
  • Choose an installed voice, and have it read back some text that you enter into a text input box. 

Note  Building this sample requires Windows 8.1 and Microsoft Visual Studio 2013 with Update 2 or later....

image

...

Here’s a few more links you might find interesting:



The Discussion

  • User profile image
    Vino

    AFAIK there is no way to integrate Cortana in WPF applications running on Windows 8/10.

    Will Cortana be available for WPF applications?

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.