Compartilhar via


TalkBack (Windows CE 5.0)

Send Feedback

TalkBack demonstrates speech recognition (SR) and text-to-speech (TTS) capabilities. You can speak any word or phrase and TalkBack will attempt to recognize it, display it on the screen and even play back the actual spoken phrase, allowing you to confirm the transcription.

TalkBack does everything that a major SR application needs to do and does it in only a few lines. It initializes the SR and TTS engines, accepts input from the microphone, and provides audio playback through speakers. It also recognizes words, displays them on the screen, and speaks them back with the computer's TTS voice.

You are encouraged to look at the code. To keep it simple, a DOS interface is used. Therefore, it needs very little code for maintaining the user interface. The few messages that exist are posted to the screen using the printf() command.

Using TalkBack

TalkBack is a console application but may be treated as a Windows one. Double-clicking its application icon launches it and it will be run in a new console window. You can also launch it from within a console window by typing "Talkback" along with any command line parameters. The application will then run in the current console window.

TalkBack accepts up to two optional parameters:

Talkback -noTTS -noReplay

-noTTS disables the TTS voice from speaking the recognized result.

-noReplay disables the playback of your actual spoken word. By default, neither function is disabled.

Once started, you will be prompted on the screen with:

I will repeat everything you say.
Say "Stop" to exit.

You can talk into the microphone. Any word or words can be spoken, although it works best with only a few words at a time. This recognition may take a few moments depending the system's capabilities. The SR engine processes the phrase and displays it on the screen:

I heard: though

If replay is not disabled, it plays back the recorded word by speaking "when you said:" and the actual word. This can be repeated any number of times. As part of the demonstration, the SR engine will force a match for the word even if the match is an unlikely one. For example, a nonsense word will return a match. A more robust application would likely question or mark the word to warn you that no reasonable match was found.

To exit the application, you can say "stop." On a successful recognition, TalkBack will quit. You can also use the close box on the window or, if running from the command line, use CTRL+C.

See Also

SAPI Samples

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.