Replaying a Debug Session
The Microsoft Speech Application SDK Version 1.1 (SASDK) provides Log Player to replay individual or multiple debug sessions.
- Replaying an Individual Debug Session
- Replaying Multiple Debug Sessions
Replaying an Individual Debug Session
Use Log Player to replay an individual debug session. Log Player is located in the SDKTools folder. If the SASDK is installed in the default location, the SDKTools folder can be found at:
%system drive%:\Program Files\Microsoft Speech Application SDK 1.1\SDKTools
Choosing Log Player Options
When using the Log Player, several options are available. These include the following:
- Replay Mode. Choose Simple if changes have been made to the application that do not affect the resulting output or the returned Semantic Markup Language (SML) or Strict if the log file remains in its original form. Differences which would cause errors in Strict mode are reported as warnings in Simple mode
- Show Warnings. This option is unavailable in Strict mode. Enable this option in Simple mode when warning messages are required.
- Record Log File. Enable this option if a new log file is needed for comparison with the old log file.
To replay an individual debug session
- On the taskbar, click Start, point to All Programs, point to Microsoft Speech Application SDK Version 1.1, point to Debugging Tools, and then on the shortcut menu, click Speech Debugging Console Log Player.
- On Speech Debugging Console Log Player, to the right of the Log file path text box, click Browse to open the Open A Log File dialog box.
- In the Open A Log File dialog box, browse to the folder that contains the relevant XML log file for the debug session, click the XML file, and then click Open.
- To replay the selected session, click Play.
- - or -
- From the Replay menu, click Start.
The log is replayed using either edited SML or text input. A new log file is created, and a pass or fail result is displayed for each log.
To stop replay
- Click Stop.
- - or -
- From the Replay menu, click Stop.
To replay a debug session, Speech Debugging Console must be enabled outside the Visual Studio .NET 2003 development environment. If Speech Debugging Console is not enabled outside the development environment, a Log Player warning appears when attempting to open Log Player.
When asked whether Speech Debugging Console should be enabled, click Yes to continue with the replay.
Conditions that Cause Log Player to Fail
In Simple mode, only changes in recognition results and prompt text cause errors to occur.
In Strict mode, the following two tables contain an exact list of conditions, values, and other items. If the Log Player encounters any changes in these items, a failure is reported.
Item |
---|
The following items associated with listen-started events:
|
The list of parameters for the listen element; including for example, the parameter name and value. |
The following items associated with active grammars:
|
The record element, including the type and beep attributes |
The following items or conditions associated with recognitions:
|
The following items or conditions associated with exceptions:
|
The following items associated with Dtmf starts:
|
The following items associated with Prompt starts:
|
The following table applies to Telephony Application Simulator only. If the Log Player encounters any changes in these items, a failure is reported.
Item |
---|
Call Management Controls:
|
The application URL when the restart occurs |
The number to dial |
Log Player cannot replay a log file that contains any audio (speech) input.
With applications that flush the PromptQueue object, the Log Player will only be able to accurately replay logs if Play Prompts is switched off on the Speech Debugging Console Configuration dialog box.
Replaying Multiple Debug Sessions
Log Player can replay multiple debug sessions at a time when run in batch mode. Running Log Player in batch mode involves:
- Manually creating an XML batch file that contains the paths to the individual log files to be replayed.
- Running Log Player in batch mode from the command line, passing to it the XML batch file as a parameter.
The SASDK provides a schema that defines the valid structure of the XML file. Use this schema as a guide when creating the batch XML file. If the SASDK is installed in the default location, the schema, BatchReplay.xsd, can be found at:
%system drive%:\Program Files\Microsoft Speech Application SDK 1.1\SDKTools\BatchReplay.xsd
Create the XML batch file using any plain text or XML editor.
The following code example illustrates a sample XML batch file that will replay two debug sessions using log files 20030507093859.xml and 20030507095458.xml, and save the batch replay results to another file, BatchResults.xml.
<BatchReplay>
<ResultsFilePath>BatchResults.xml</ResultsFilePath>
<Replay Mode="Strict">
<LogFilePath>c:\SpeechLogs\20030507093859.xml</LogFilePath>
</Replay>
<Replay Mode="Strict">
<LogFilePath>c:\SpeechLogs\20030507095458.xml</LogFilePath>
</Replay>
</BatchReplay>
To replay multiple debug sessions at a time
- Create an XML batch file, and save the file to a folder.
- Open a command prompt window, and type the following at the command line.
- SDKToolsPath\LogPlayer BatchFilePath\BatchFileName
An instance of Log Player and Speech Debugging Console opens for each debug session that is replayed. Each instance of Log Player and Speech Debugging Console closes automatically after the debug session replays.
See Also
Debugging Speech Applications | Debugging the Tutorial Application