No, you're not crazy, you're just talking to your Windows Phone 8 app (and this sample shows you how)

Sign in to queue


Today's Mobile Monday project is a Windows Phone 8 SDK Sample project that shows off something I've not seen highlighted too often, how you can build in voice and speech into your Windows Phone 8 app's.

Alarm Clock with voice Commands Sample

This sample demonstrates how to manage an alarm by using voice commands.

The sample demonstrates the basics of the voice commands feature, which is a part of the speech feature for Windows Phone 8. The sample also demonstrates how to use the Alarm class. After the app launches, exit the app to the Start screen and tap and hold the Start button to view and accept the speech privacy policy. You can then use voice commands to set an alarm, turn off the alarm, and so on. A full list of the available voice commands are in the voicecommands.xml file, which is located in the root folder of the app.

This sample uses the Windows.Phone.Speech.VoiceCommands Windows Phone Runtime API. For more info about the speech feature in Windows Phone 8, see Speech for Windows Phone 8.

When you grab the sample and play with it in the Emulator, you long press/click the Start button (the Windows logo on the bottom of the phone, in the middle), accept the speech recognition warning, say the application, "Alarm Clock" and then the commands, "Turn alarm on", "Turn alarm off" or "Set alarm for [time]". Being the guy I am, I wasn't saying the application first. No wonder the phone had no clue what I was actually trying to tell it what to do...


Not having done any speech recognition app's for Windows Phone 8 before (or any Windows Phone version for that matter), what I really liked was how all the voice commands being listened for were all in one place, in an easily readable layout, in the voicecommands.xml


The app load's, loads the XML and then setups up an async listening command.


When a command comes in, it branches based on the command and also shows how easy it is to respond back with speech.


In short, this shows off just how easy it is to add speech recognition and voice to your app's...

The Discussion

Add Your 2 Cents