In This Chapter
Creating a speech-driven drawing app
Recognizing speech with ready-to-use grammars, simple phrase list grammars, and powerful SRGS grammars
Building a voice command driven weather app
Adding semantic information to a grammar
Providing a custom speech recognition UI
Recognizing speech in other languages
Text-to-Speech using simple strings or powerful speech synthesis markup files
Text-to-Speech using multiple languages
Synchronizing speech synthesis with UI elements
Speech is a natural, efficient, and accurate way to interact with the phone. The new speech features of the Windows Phone 8 SDK allow you to create exciting speech driven experiences for your users and incorporate both speech recognition and speech synthesis, known as Text-to-Speech.
This chapter begins by exploring speech recognition. You see how to employ speech recognition using the SDK’s ready-to-use grammars. You also see how to define simple list grammars, and then how to author an XML-based grammar. The sample for this section demonstrates how to create a voice-driven paint app, which allows the user to place shapes on a canvas using voice commands such as “Add blue circle.”
The chapter then looks at how to override the built-in speech recognition GUI to create your own custom speech recognition UI, and at recognizing speech in other languages.
It then discusses voice commands and how they can be used to launch your app and to execute custom logic within your app. You learn how to create a Weather Voice app that leverages the Yahoo! Weather service to display weather information for a location spoken via a voice command.
Finally the chapter looks at Text-to-Speech, and you see how to customize the speaking voice of the phone’s speech synthesizer. You look at creating a speech script using an XML definition, which allows you to set the language, gender, and intonation of sections of speech. You also look at how to employ bookmarks in your script to provide feedback to your code during speech synthesis.
The source code for this chapter can be found in the Vaughan.WPUnleashed solution, in the MainExamples directory of the downloadable sample code.
18.218.228.99