Export (0) Print
Expand All

Talkback (SAPI 5.3)

Speech API 5.3
Microsoft Speech API 5.3

Talkback

Introduction

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.

Its unsophisticated interface belies the richness of the underlying tool suite. 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 opens it and it will be run in a new console window. You may also open 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 may talk into the microphone. Any word or words may 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 may 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 may say, "stop." Upon a successful recognition, TalkBack will quit. You may also use the close box on the window or, if running from the command line, use CTRL+C.

Show:
© 2014 Microsoft