Share via


Formatting Data for Speech

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.

Use text normalization functions in Speech Prompt Editor to control the way in which data is spoken in prompts. Without a text normalization function, the text-to-speech (TTS) engine speaks the phone number (555) 555 5555 as "open paren five hundred fifty five close paren five million five hundred fifty five thousand five hundred fifty five." Adding a text normalization function allows the prompt engine to use recorded prompts and speak this phone number as "area code five five five (pause) five five five (pause) five five five five."

Text normalization functions are useful for formatting a variety of data, as shown in the following table.

Description Example

Credit card numbers

1234 5678 9012 3456

Dates

04/13/85

Phone numbers

(111) 222-3333

Abbreviations

Mr. (Mister), Dr. (Doctor or Drive), St. (Street or Saint), oz (ounce), lb (pound)

Addresses

1 Microsoft Way Redmond, WA 98052

Adding Text Normalization Functions to Transcriptions

Add text normalization functions to transcription files in the prompt project. Use the peml:rule element in Prompt Engine XML to specify which text normalization function to apply to the prompt text. See the following example, where the rule element references a prompt function called phone_number to speak the phone number 01-1-425-555-0100.

<peml:prompt_output>
<peml:rule name="phone_number">01-1-425-555-0100</peml:rule>
</peml:prompt_output>

To add a normalization script file to a prompt project

  1. Open a prompt project.

  2. In Solution Explorer, right-click the project, click Add, and then click Add New Item.

  3. In the Add New Item dialog box, double-click the VBScript File icon or the JScript File icon in the Templates pane.

Handling Speech Synthesis Markup Language (SSML) Differences Between the Client and Server

The prompt engine used in the development environment is different than the prompt engine deployed to Speech Server. In some cases, especially when text normalization is used, prompts sound different in the development environment versus the production environment. To discover these differences, test prompts thoroughly in the production environment. If differences are found, try rewriting the prompts to minimize any problems.

See Also

Other Resources

Prompt Projects and Databases
Prompt Transcriptions and Recordings