Debugging Voice-only Applications
By default, when a voice-only application Start page opens, both Telephony Application Simulator (TASim) and Speech Debugging Console will also open. This topic describes the recommended settings for both debugging tools.
Selecting Languages and Speech Engines
Because TASim can be used outside of the Visual Studio .NET 2003 environment, it is possible while using TASim to view what languages are installed, and to select alternate engines.
To see which languages are installed, and to see the speech recognition and voice engines associated with those languages, in TASim on the Tools menu select Options, and view the table in that dialog box. The dialog box displays all installed languages, including English which is the default language in the Microsoft Speech Application SDK.
To add or delete a language, install or uninstall the appropriate language pack. For more information, see Installing or Removing a Language Pack.
When a new language pack is installed the appropriate languages and mapped engines are added to the table. The display of installed languages includes the three columns listed in the following table.
Column | Description |
---|---|
Language | Lists all installed languages. |
Voice | Lists the voice engine currently mapped to this language, as returned by SAPI. |
Recognizer | Lists the speech recognition engine currently mapped to this language, as returned by SAPI. |
To select a different speech recognition or voice engine, click an entry in the Voice or Recognizer column in this table and select from the listed engines.
Debugging Non-English Language Applications
By default TASim is specified as the start application for voice-only applications. If this setting is changed, for example when copying a speech application from one computer to another, debugging can fail with the error "The language of the resource is not supported." TASim should be used for debugging voice-only applications. Use the following procedure to specify TASim as the start application.
To set TASim as the default start application
- In Visual Studio, open Solution Explorer.
- Right-click the project file and select Properties on the shortcut menu.
- In the project Property Pages dialog box, in the left pane expand the Configuration Properties menu item, and select Debugging.
- In the right pane set Debug Mode to Program.
- Set Command Line Arguments to the path of the application Start Page, for example http://myServer/myApplication/Default.aspx.
- Select Start Application, click the Browse button (...) and select TASim.exe. By default TASim.exe is located at this path: Program Files\Microsoft Speech Application SDK 1.1\SDK Tools\Telephony Application Simulator.
Avoiding Time-outs
A Start page may load slowly, either because the Start page itself is large or because the application is loading large application resource files. The default time-out setting is 5 seconds. To prevent time-outs from occurring, increase the time-out setting on the Speech Debugging Console Configuration dialog box.
To change the Speech Debugging Console Time-out setting
- On the taskbar, click Start, point to All Programs, point to Microsoft Speech Application SDK Version 1.1, point to Debugging Tools, and on the shortcut menu, click Speech Debugging Console Configuration.
- On the Speech Debugging Console Configuration dialog box, change the value in the Timeout (ms) text box.
Diagnosing Grammar Failures
When Speech Engine Services (SES) fails to load a grammar, a user running Telephony Application Simulator (TASim) will see a -4 error, but will not see which grammar failed to load.
The workaround is to turn on the logSink, which will send all TASim events to the Application Event Viewer. Once all TASim events are logged it is easier to determine why a grammar did not load. To turn on the logSink, use the eventSinkRef element to add the sink name to the TASiminstrumentation.config file, as in the following example.
<filters>
<filter name="TraceAll">
<eventCategoryRef name="All Events">
<eventSinkRef name="TASimSink" />
<eventSinkRef name="logSink" />
</eventCategoryRef>
</filter>
</filters>
The default installation path for TASiminstrumentation.config is C:\Program Files\Microsoft Speech Application SDK 1.1\SDKTools\Telephony Application Simulator\TASimInstrumentation.config.
Speech Recognition
This section describes how to enable remote speech recognition, and which recognition mode TASim supports,
Setting Recognition Mode
TASim supports automatic recognition mode only. Use the mode attribute of the listen element to set recognition mode.
Enabling Remote Speech Recognition
Use the SpeechServer key in the file TASim.exe.config to specify the location of the speech recognition engine. By default, the value of the SpeechServer key is desktop. Set this value to point to Microsoft Speech Server (MSS) when Speech Engine Services is running on a remote server.
To set the value of the SpeechServer key
- Use Notepad to open the file, TASim.exe.config. By default, it is installed at this path: Program Files\Microsoft Speech Application SDK\SDKTools\Telephony Application Simulator.
- Set the value of the SpeechServer key to the URL of MSS, as in the following example.
<add key="SpeechServer" value="http://<servername>/ses/lobby.asmx" />
- Save and close TASim.exe.config.
The four keys contained in the file TASim.exe.config are described in the following table.
Key | Description |
---|---|
Lang | Specifies the RFC 1766 language ID that is specified in the HTTP-ACCEPT-LANG header. The only currently supported value is en-US. |
RecordingDirectory | Specifies the local directory path used for saving sound recordings. |
SpeechServer | Specifies the speech server that is used for all audio processing. The default value is Desktop. To enable remote recognition, enter a URL for a Microsoft Speech Server running Speech Engine Services. For example, http://mySpeechServer/ses/lobby.asmx. |
instrumentationConfigFile | Specifies the name of the configuration file used by the logging infrastructure. |
Using Speech Debugging Console Toolbar Buttons
It is often useful for debugging purposes to have Speech Debugging Console play prompts, and to pause when waiting for input. To do this, use buttons on the Speech Debugging Console toolbar as described in the following table.
Button | Setting |
---|---|
Break on Listen | To pause the Speech Debugging Console when the application is waiting for audio input, click Break on Listen. |
Break on DTMF | To pause the Speech Debugging Console when the application is waiting for DTMF input, click Break on DTMF. |
Play Prompts | To play prompts when the application executes in a debugging session, click Play Prompts. |
Note When running Speech Debugging Console over Remote Desktop with the setting Do not play selected, if a remote speech server is used and Play Prompts is selected in Speech Debugging Console, a -1 generic error results. The workaround in this case is to turn off Play Prompts in Speech Debugging Console.
See Also
Configuring Speech Debugging Console | Recognizing and Prompting in Other Languages