共用方式為


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

sub Element (Microsoft.Speech)

Specifies a string of text to speak in place of the text contained in the element.

Syntax

<sub alias="string"> </sub>

Attributes

Attribute

Description

alias

Required. Specifies the substitute text.

Remarks

Before synthesizing a phrase, the text-to-speech (TTS) engine normalizes it. The normalization process converts symbols, numbers, and other non-orthographic entities into text representing the spoken value of these entities. For example, normalization converts "$1.99" into "one dollar and ninety-nine cents."

Use a sub element to create a custom text value for any text element. Because the TTS engine processes sub elements before normalizing the phrase, the substitute text is normalized before being synthesized.

Example

<?xml version="1.0" encoding="ISO-8859-1"?>
<speak version="1.0"
 xmlns ="http://www.w3.org/2001/10/synthesis"
 xml:lang="en-US">

  <!--Instruct the text-to-speech engine to pronounce
  the string "SAPI" as "Speech Application Programming Interface"-->

  <sub alias="Speech Application Programming Interface"> SAPI </sub>

</speak>