Export (0) Print
Expand All

AudioApp for Visual Basic (SAPI 5.3)

Speech API 5.3

Microsoft Speech API 5.3

AudioApp for Visual Basic

Introduction

AudioApp is a rudimentary application showcasing custom audio objects.

A custom audio object uses audio in a non-standard way, and is designed to handle specialized audio needs. Most applications or programmers, however, will be able to use the standard audio devices or the default devices connected to the computer.

AudioApp performs speech recognition using a text-to-speech (TTS) voice. However, conventional output devices (speakers) are not used. A custom audio device is used instead. The computer does not need to have speakers installed since the speaking functions are essentially emulated.

Using AudioApp

To run AudioApp, enter the text to be spoken in the first text box. Click the Reco From TTS button to initiate the recognition attempt. The status bar at the bottom of the dialog box displays the process that is currently performing. The results of a successful recognition display in the second text box.

The custom audio device does not play the spoken text audibly so there will be no voice to hear. The recognition attempt is based on the TTS voice speaking the text. The quality of the spoken text changes slightly each time the application is run. As a result, the recognized text may also be different each time. This is unlike ISpeechRecognizer.EmulateRecognition in which the recognitions will always be the same for all attempts. Final recognition is identical to the original text.

Options

AudioApp has one control: Reco From TTS.

Reco From TTS

Starts the recognition attempt. See Using AudioApp for complete details.

Exit

Click the close box in the title bar to exit AudioApp.

Compiling

AudioApp is a standard Visual Basic application and does not require special support. However, the Speech reference must be active; see Creating a Speech-Enabled Visual Basic Project in Using the Visual Basic Code Examples for details to speech enable Visual Basic applications. Additionally, the samples are installed as Locked files. To modify them, they must be unlocked. To unlock, right-click the file or files, select Properties, and clear the Read-Only check box.

Programming Notes

If AudioApp is run from the Visual Basic development environment, the debugger's Immediate window displays information not available from the executable version. See the code for exact details.

See Using a Custom Audio Object for details writing and implementing them. The custom audio object in this sample is of type SpAudioPlug, which is specific and unique to the application. It is a DLL (simpleaudio.dll) loaded during the SAPI install and the Reference object is named SimpleAudio 1.0 Type Lib and display in Visual Basic's Object Browser as SimpleAudioLib.

Show:
© 2014 Microsoft