Share via


Authoring Notes

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

The following sections contain notes for authors who are developing Microsoft Speech Controls.

Placement of Speech Controls

Speech Controls must be contained in an HtmlForm server control. To create this control, add the attribute to an HTML <form> control. The behavior of Speech Controls placed outside of <form > tags is undefined.

Placement of Script Blocks

Blocks of script that contain functions that are referenced by Speech Controls should be placed before the referencing Speech Controls on the page. Under certain hardware configurations, Speech Server writes a warning message in the event log when a Speech Control references a script routine that is below it in source-code order on the page. The text of this message is "Warning: eval causes perf degradation:" followed by the name of the script routine.

Common Properties of Speech Controls

All Speech Controls expose the following properties:

  • ID
  • Visible
  • Enabled

The ID property is reflected in the client-side representation of the control. The control does not render when the Visible or Enabled property is set to false.

Assigning Speech Control ID Properties

The ID property of a Speech Control should consist entirely of ASCII characters in the ranges A???Z, a???z, and 0???9. ID properties containing characters that are placed outside this range might fail to display properly and references to such IDs might fail.

Call window.close() in the DefaultErrorPage

The DefaultErrorPage installed by Speech Server calls the window.close() method when it is complete to release the Telephony Application Services channel properly. Custom error pages for Speech Control telephony applications should also call window.close().

Format of Script References

Speech Controls have properties with values that reference script functions written by the dialog author. These functions are executed on client devices in response to speech-related events such as time-outs and errors. References to these functions must not include parentheses. The following syntax is correct.

<Prompt id="P1" PromptSelectFunction="myFunction" />

The following syntax is incorrect.

<Prompt id="P2" PromptSelectFunction="myFunction()" />

Validation of Client-Side Script References

During control rendering, the validation of references to client-side functions is not performed. If a property contains a reference to a client-side script function and the function does not exist, exceptions occur on the client but not on the server.

ViewState Security

When the EnableViewStateMAC property of the ASP.NET Page class is set to true, the server performs a message authenticity check on the posted ViewState data to prevent the uploading of malicious scripts inside ViewState data. It is recommended that authors leave the value of this property set to true.

Case-Sensitivity of Event Names

Names of functions and events are case-sensitive in JScript. The case for event names specified in the StartEvent and StopEvent properties of the Prompt object must be exactly as those events are defined. Most standard Internet Explorer events are lowercase. For example, the author must specify the onmouseup and onmousedown events in lowercase letters.

Case-Sensitivity of URLs

The URLs used in .aspx files, in the application manifest, and in URLs cached by Speech Engine Services are case-sensitive.

Minimum Client Requirements

Clients must be running Microsoft Internet Explorer 6.0 SP1 and JScript 5.5 for Speech Controls and associated script functions to work properly.

Required JScript File Encoding in Multi-language Projects

In multi-language projects, JScript files from any editor must be saved as Unicode (UTF-8 with signature) - Codepage 65001. In particular, when saving JScript files in Visual Studio 2005, this selection must be made every time the file is saved or the setting is not correct.

To set JScript file encoding in Visual Studio 2005

  1. On the File menu in Visual Studio 2005, click Advanced Save Options.

  2. In the Advanced Save Options dialog box, select Unicode (UTF-8 with signature) - Codepage 65001 in the Encoding list.

  3. Click OK.

See Also

Concepts

SpeechControls Introduction