Compartir a través de


Speech for Windows Phone 8

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

In Windows Phone 8 users can interact with your app using speech. There are three speech components that you can integrate with your app: voice commands, speech recognition, and text-to-speech (TTS), as demonstrated in the following image:

Voice Commands

When a user installs your app, they can automatically use voice commands to access it by speaking "open" or "start", followed by your app name. As a developer, you can also leverage voice commands to allow users to deep link into your app, from outside of your app, by speaking a phrase such as "Start Contoso Search" or "Contoso Show Me My Favorites." You can set up your app so that the phrase links to a specific page in your app, performs a task, or initiates an action.

Discoverability is also a key aspect of voice commands. When you extend and customize voice commands, end users can find out what phrases your app is listening for through system help and the What can I say screen.

For more info, see Voice commands for Windows Phone 8.

Speech recognition

From inside your app, users can speak to give input or to accomplish tasks by using speech recognition. Speech recognition conceptually seems very similar to the voice command feature, but is developed in a different way, using a different API. The key is that speech recognition occurs when you are in the app, and voice commands occur from outside of the app.

Windows Phone 8 includes support for pre-defined grammars for free-text dictation and web search, and also supports custom grammars that are authored using the industry-standard Speech Recognition Grammar Specification (SRGS) Version 1.0. You can create your own GUI, or use a built-in GUI for speech recognition that supports disambiguation and provides visual feedback to users.

For more info, see Speech recognition for Windows Phone 8.

Text-to-speech (TTS)

Also while inside your app, you can use text-to-speech (TTS), also known as speech synthesis, to speak text to the user through the phone’s speaker. Your app can speak a simple string of text, or a formatted string defined by the industry-standard Speech Synthesis Markup Language (SSML) Version 1.0.

For more info, see Text-to-speech (TTS) for Windows Phone 8.

Speech samples

The following table lists the set of speech-related code samples that are available for download.

Sample name

Speech features demonstrated in sample

Speech recognition and text-to-speech

  • Handle the speech privacy policy

  • Implement speech recognition

  • Create a custom list grammar

  • Output spoken text using TTS

  • Continuous speech recognition

Short message dictation and web search grammars

  • Speech recognition using predefined short message grammar

  • Speech recognition using predefined web search grammar

Alarm clock with voice commands

  • Voice commands

Basic text-to-speech (TTS)

  • Basic speech synthesis, text-to-speech (TTS)

Play with text-to-speech (speech synthesis) installed voices

  • List the installed voices on your device

  • Output spoken text using TTS

Recognition using custom grammars

  • How to create alternate paths in a grammar

  • Check recognition confidence

  • Confirm user input

  • Use the EndSilenceTimeout property to allow users to pause when speaking longer phrases

Updating a voice command phrase list using a background agent

Speech design guidelines

Designed thoughtfully and implemented effectively, speech can be a robust and enjoyable way for people to interact with your Windows Phone app, complementing or even replacing interaction by touch, tap, and gestures. Before beginning the development stage, browse the Speech design guidelines for Windows Phone topic for helpful tips on designing a useful, engaging speech-enabled app.

See Also

Other Resources

Speech design guidelines for Windows Phone

Speech Samples for Windows Phone 8