SSML-based synthesis

Updated at:

This topic describes Speech Synthesis Markup Language (SSML), its supported tags, and examples.

Overview

SSML is an XML-based markup language for speech synthesis. It controls sentence and word boundaries, pronunciation, speech rate, pauses, pitch, and volume, and can add background music.

Intelligent Speech Interaction implements W3C SSML 1.0 and supports the tags described in this topic, rather than all W3C tags.

Usage

SSML is currently supported only for Chinese and English voices. Supported tags and content differ by language, as described in the following tag reference.

  • For short-text speech synthesis, enclose all text in a single <speak>...</speak> root element. The XML declaration before <speak> can be omitted.

  • Long-text tasks, including real-time and asynchronous long-text synthesis, can contain multiple <speak>...</speak> pairs and mix SSML with plain text. The following text can be sent in a single long-text request. For real-time long-text synthesis with the Java SDK, set the text by using setLongText.

    <speak><say-as interpret-as="telephone">114</say-as>查询号码 <say-as interpret-as="cardinal">123</say-as>开始干。加起来为<say-as interpret-as="digits">1234</say-as>。<say-as interpret-as="name">张三</say-as>的快递。<say-as interpret-as="address">富路国际1号楼3单元304</say-as><say-as interpret-as="nick">李四6689</say-as></speak>

Escape XML special characters in tag content and attributes: use &quot; for ", &apos; for ', &amp; for &, &lt; for <, and &gt; for >.

Pass SSML text in the text parameter of a speech synthesis request. The following example shows a Java SDK snippet and the corresponding request. For client initialization and the complete calling procedure, see Java SDK.

Java SDK snippet:

SpeechSynthesizer synthesizer = new SpeechSynthesizer(client, getSynthesizerListener());
String text = "<speak>请闭上眼睛休息一下<break time=\"500ms\"/>好了,请睁开眼睛。</speak>";
synthesizer.setText(text);

Corresponding request:

{
    "payload": {
        "volume": 50,
        "sample_rate": 16000,
        "format": "wav",
        "text": "<speak>请闭上眼睛休息一下<break time=\"500ms\"/>好了,请睁开眼睛。</speak>"
    },
    "context": {
        "sdk": {
            "name": "nls-sdk-java",
            "version": "2.0.4"
        }
    },
    "header": {
        "namespace": "SpeechSynthesizer",
        "name": "StartSynthesis",
        "message_id": "5fdf78c0dd574b6897f3cb204dd0****",
        "appkey": "fd4er4aa****",
        "task_id": "6e1be78ef5804c50a2c5a8b92de1****"
    }
}      

Tags

<speak>

The <speak> tag is the root element for all supported Speech Synthesis Markup Language (SSML) tags and must enclose all SSML-formatted text.

 <speak>SSML text</speak>

Attributes

The <speak> tag supports the following properties.

Attribute

Type

Value

Required

Description

voice

String

The name of the online speaker that can be called. The value is the lowercase value of the voice parameter, such as "siyue".

No

A proprietary tag of Alibaba Cloud speech synthesis. It specifies the speaker during synthesis and has a higher priority than the speaker specified by the voice parameter in the API request.

"xiaoyue" cannot currently be set by voice.

encodeType

String

PCM, WAV, or MP3

No

A proprietary tag of Alibaba Cloud speech synthesis. It specifies the audio file format during synthesis and has a higher priority than the format specified by the format parameter in the API request.

The encodeType setting in SSML tags is invalid for real-time long-text synthesis tasks.

sampleRate

String

8000, 16000, 24000, or 48000

No

A proprietary tag of Alibaba Cloud speech synthesis. It specifies the audio sample rate during synthesis and has a higher priority than the rate specified by the sample_rate parameter in the API request.

The sampleRate setting in SSML tags is invalid for real-time long-text synthesis tasks.

rate

String

An integer from -500 to 500. The default value is 0.

  • A value greater than 0 increases the speech rate.

  • A value less than 0 decreases the speech rate.

No

A proprietary tag of Alibaba Cloud speech synthesis. It specifies the audio speed during synthesis and has a higher priority than the speed specified by the speech_rate parameter in the API request.

pitch

String

An integer from -500 to 500. The default value is 0.

  • A value greater than 0 raises the pitch.

  • A value less than 0 lowers the pitch.

No

A proprietary tag of Alibaba Cloud speech synthesis. It specifies the audio pitch during synthesis and has a higher priority than the pitch specified by the pitch_rate parameter in the API request.

volume

String

An integer from 0 to 100. The default value is 50.

  • A value greater than 50 increases the volume.

  • A value less than 50 decreases the volume.

No

A proprietary tag of Alibaba Cloud speech synthesis. It specifies the audio volume during synthesis and has a higher priority than the volume specified by the volume parameter in the API request.

effect

String

robot, lolita, lowpass, echo, eq, lpfilter, or hpfilter

No

A proprietary tag of Alibaba Cloud speech synthesis. Use this tag to produce different sound effects for the synthesized speech.

  • robot: robot sound effect.

  • lolita: lively female voice effect.

  • lowpass: low-pass sound effect.

  • echo: echo sound effect.

  • eq: equalizer.

  • lpfilter: low-pass filter.

  • hpfilter: high-pass filter.

  • The values eq, lpfilter, and hpfilter are advanced effectors. You can use the effectValue property to customize their effects.

  • An SSML document supports only one sound effect. You cannot specify multiple effect properties.

  • Using a sound effect increases system latency.

effectValue

String

When the effect property is set to eq, lpfilter, or hpfilter, use this parameter to modify the default effect of the effector.

No

  • eq (equalizer): The system uses eight levels by default. The corresponding frequencies are ["40 Hz", "100 Hz", "200 Hz", "400 Hz", "800 Hz", "1600 Hz", "4000 Hz", "12000 Hz"]. The corresponding bandwidths are ["1.0q", "1.0q", "1.0q", "1.0q", "1.0q", "1.0q", "1.0q", "1.0q"]. You must input the gains for the eight levels. The value range is [-20 dB, 20 dB]. For example, effectValue="1 1 1 1 1 1 1 1". This is a string of eight integers separated by spaces. A value of 0 means the gain for the corresponding frequency is not adjusted.

  • lpfilter: Enter the frequency value for the low-pass filter. The value must be an integer in the range of (0, target sample rate/2]. For example, effectValue="800".

  • hpfilter: Enter the frequency value for the high-pass filter. The value must be an integer in the range of (0, target sample rate/2]. For example, effectValue="1200".

bgm

String

The name of an available background music track. For details, see the bgm attribute.

No

A proprietary tag of Alibaba Cloud speech synthesis. It adds the specified background music to the synthesized speech.

backgroundMusicVolume

String

An integer from 0 to 100. The default value is 50.

  • A value greater than 50 increases the volume.

  • A value less than 50 decreases the volume.

No

A proprietary tag of Alibaba Cloud speech synthesis. It controls the volume of the background music.

bgm attribute

Built-in background music

The Alibaba Cloud speech synthesis service has several built-in background music tracks for you to try:

Custom background music

Store custom audio in OSS and ensure that its URL is accessible over HTTP or HTTPS. To create a bucket, see Create a bucket. For file upload and sharing, see Console quick start.

Audio requirements:

  • 16 kHz sample rate, single-channel WAV format.

  • Short-text synthesis: no larger than 2.8 MB. Long-text synthesis: no larger than 7.3 MB.

  • If the synthesis duration is longer than the background music duration, the background music will loop. If the background music is not in WAV format, you can use FFmpeg to convert it: ffmpeg -i input_audio -acodec pcm_s16le -ac 1 -ar 16000 target.wav.

  • If the URL in the tag contains special XML characters, you must escape them.

  • The bit depth must be 16-bit.

Important

You are legally responsible for the copyright of the audio you upload.

Examples

No attributes

<speak>
  需要调用SSML标签的文本
</speak>

Audio effect: SSML-speak1.mp3

voice property

<speak voice="xiaogang">
  我是男声。
</speak>

Audio effect: SSML-speak2.mp3

encodeType property

<speak encodeType="mp3">
  我可以生成压缩格式的音频。
</speak>

Audio effect: SSML-encode.mp3

sampleRate property

<speak sampleRate="8000">
  看看我的文件大小吧,是16000采样率音频的一半。
</speak>

Audio effect: SSML-speak4.mp3

rate property

<speak rate="200">
  我的语速比正常人快。
</speak>

Audio effect: SSML-speak5.mp3

pitch property

<speak pitch="-100">
  我的音高却比别人低。
</speak>

Audio effect: SSML-speak6.mp3

volume property

<speak volume="80">
  我的音量也很大。
</speak>

Audio effect: SSML-speak7.mp3

Property combination (separated by spaces)

<speak rate="200" pitch="-100" volume="80">
  所以放在一起,我的声音是这样的。
</speak>

Audio effect: SSML-speak8.mp3

effect property

<speak effect="robot">
  你喜欢机器人瓦力吗?
</speak>

Audio effect: SSML-speak9.mp3

bgm property

<speak bgm="http://nls.alicdn.com/bgm/2.wav" backgroundMusicVolume="30" rate="-500" volume="40">
  <break time="2s"/>
  阴崖老木苍苍烟
  <break time="700ms"/>
  雨声犹在竹林间
  <break time="700ms"/>
  绵蕝固知裨国计
  <break time="700ms"/>
  绵州风物总堪怜
  <break time="2s"/>
</speak>

Audio effect: SSML-speak10.mp3

Tag relationships

The <speak> tag can contain text and the following tags:

  • <break>

  • <s>

  • <w>

  • <phoneme>

  • <say-as>

  • <vhml/>

<emotion>

The <emotion> tag is used for multi-emotion speech synthesis. This tag is optional. If you use this tag with a speaker that does not support multi-emotion speech synthesis, the synthesis request fails.

<emotion category="happy" intensity="1.0">今天天气真不错!</emotion>

Attributes

The <emotion> tag supports the following properties.

Attribute

Type

Value

Required

Description

category

String

Enumeration value, such as neutral or happy.

Yes

Specifies the emotion of the speech. For the emotions supported by each speaker, see the following table.

intensity

String

Floating-point value. The range is [0.01, 2.0].

No

Specifies the intensity of the emotion. The default value is 1.0, which indicates the predefined emotion intensity. The minimum value is 0.01, which results in a slight tendency toward the target emotion. The maximum value is 2.0, which doubles the intensity of the target emotion.

This topic describes the support for multi-emotion voices.

Voice name

voice parameter value

Emotion category

Zhifeng_Multi-emotion

zhifeng_emo

angry, fear, happy, neutral, sad, surprise

Zhibing_Multi-emotion

zhibing_emo

angry, fear, happy, neutral, sad, surprise

Zhimiao_Multi-emotion

zhimiao_emo

serious, sad, disgust, jealousy, embarrassed, happy, fear, surprise, neutral, frustrated, affectionate, gentle, angry, newscast, customer-service, story, living

Zhimi_Multi-emotion

zhimi_emo

angry, fear, happy, hate, neutral, sad, surprise

Zhiyan_Multi-emotion

zhiyan_emo

neutral, happy, angry, sad, fear, hate, surprise, arousal

Zhibei_Multi-emotion

zhibei_emo

neutral, happy, angry, sad, fear, hate, surprise

Zhitian_Multi-emotion

zhitian_emo

neutral, happy, angry, sad, fear, hate, surprise

Examples

<speak voice="zhitian_emo">
    <emotion category="happy" intensity="1.0">今天天气真不错!</emotion>
</speak>

Audio effect: SSML-emotion.wav

Tag relationships

The <emotion> tag can contain text and the following tags:

  • <s>

  • <sub>

  • <say-as>

  • <w>

  • <phoneme>

  • <soundEvent/>

  • <break/>

  • <vhml/>

<break>

You can use this tag to insert a pause in the text. This tag is optional.

<!-- Without attributes -->
<break/>
<!-- With the time attribute -->
<break time="string"/>

Attributes

If you use the <break> tag without any properties, the default pause duration is 1s.

Attribute

Type

Value

Required

Description

time

String

[number] s / [number] ms

No

Sets the duration of the pause in seconds (s) or milliseconds (ms), such as "2s" or "50ms".

  • [number]s: The duration in seconds. [number] must be an integer from 1 to 10.

  • [number]ms: The duration in milliseconds. [number] must be an integer from 50 to 10000.

If multiple <break> tags appear consecutively, the total pause duration is the sum of the durations of each tag. If the total duration exceeds 10 seconds, the effective pause duration is 10 seconds.

For example, in the following code, the total pause duration of the three consecutive <break> tags is 15 seconds. Because this exceeds 10 seconds, the final effective pause duration is 10 seconds.

<speak>
  Close your eyes and take a rest.<break time="5s"/><break time="5s"/><break time="5s"/>Okay, now open your eyes.
</speak>

Examples

 <speak>
   请闭上眼睛休息一下<break time="500ms"/>好了,请睁开眼睛。
 </speak>

Audio effect: SSML-break.mp3

Tag relationships

The <break> tag is an empty tag and cannot contain other tags. If an SSML structure contains an <s> tag, place the <break> tag inside it to set a pause for that paragraph or sentence.

<s>

You can use this tag to represent the sentence structure of the text. This tag is optional.

 <s>text</s>

Attributes

None.

Examples

<speak><s>这是第一句话</s><s>这是第二句话</s></speak>

Audio effect: SSML-s.mp3

Tag relationships

The <s> tag can contain text and the following tags:

  • <break>

  • <w>

  • <phoneme>

  • <say-as>

  • <vhml/>

<sub>

This tag replaces the text within it with an alias.

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

Attributes

Attribute

Type

Value

Required

Description

alias

String

The replacement content.

Yes

Used to replace the text within the tag.

Examples

 <speak><sub alias="网络协议标准">W3C</sub></speak>

Audio effect: SSML-sub.mp3

Tag relationships

The <sub> tag can contain text and the <vhml/> tag.

<w>

You can use this tag to define the word structure of the text. This tag is optional. Because English text is typically tokenized by spaces, this tag is usually not required for English. The content within a <w> tag must be a single word or phrase. The word or phrase cannot be a mix of Chinese and other languages.

 <w>text</w>

Attributes

None.

Examples

 <speak>南京市长<w>江大桥</w>今天发表了演讲。</speak>

Audio effect: SSML-w.mp3

Tag relationships

The <w> tag can contain text and the <vhml/> tag.

<vhml>

To obtain timestamps for animation markers, set enable_subtitle=true and enable_phoneme_timestamp=true in the speech synthesis request.

The <vhml/> tag is a Virtual Human Markup Language tag that inserts markers for body and facial animation into text. Its src attribute is a user-defined string. The value is returned in the subtitle timestamp data and can be used to drive facial or body animation. The marker appears in text, phoneme is the string "null", and begin_index, end_index, begin_time, and end_time are all 0.

Usually, <vhml> markers appear in timestamp data in the same order as in the original text. If a marker is inside or adjacent to text that requires normalization (for example, 123 is normalized to “一百二十三”), its returned position may differ from its position in the original text. The relative order of multiple <vhml> markers is preserved.

<vhml src="content"/>

Attributes

None.

Examples

<speak><vhml src="start"/>我们今天来<vhml src="t0"/>介绍一下这个新商品<vhml src="end"/></speak>

Timestamp data:

{
   "subtitles":[
      {
         "text":"start",
         "phoneme":"null",
         "begin_index":0,
         "end_index":0,
         "begin_time":0,
         "end_time":0
      },
      {
         "text":"我",
         "phoneme":"null",
         "begin_index":0,
         "end_index":1,
         "begin_time":0,
         "end_time":88
      },
      {
         "text":"们",
         "phoneme":"null",
         "begin_index":1,
         "end_index":2,
         "begin_time":88,
         "end_time":238
      },
      {
         "text":"今",
         "phoneme":"null",
         "begin_index":2,
         "end_index":3,
         "begin_time":238,
         "end_time":450
      },
      {
         "text":"天",
         "phoneme":"null",
         "begin_index":3,
         "end_index":4,
         "begin_time":450,
         "end_time":650
      },
      {
         "text":"来",
         "phoneme":"null",
         "begin_index":4,
         "end_index":5,
         "begin_time":650,
         "end_time":825
      },
      {
         "text":"t0",
         "phoneme":"null",
         "begin_index":0,
         "end_index":0,
         "begin_time":0,
         "end_time":0
      },
      {
         "text":"介",
         "phoneme":"null",
         "begin_index":5,
         "end_index":6,
         "begin_time":825,
         "end_time":988
      },
      {
         "text":"绍",
         "phoneme":"null",
         "begin_index":6,
         "end_index":7,
         "begin_time":988,
         "end_time":1213
      },
      {
         "text":"一",
         "phoneme":"null",
         "begin_index":7,
         "end_index":8,
         "begin_time":1213,
         "end_time":1325
      },
      {
         "text":"下",
         "phoneme":"null",
         "begin_index":8,
         "end_index":9,
         "begin_time":1325,
         "end_time":1525
      },
      {
         "text":"这",
         "phoneme":"null",
         "begin_index":9,
         "end_index":10,
         "begin_time":1525,
         "end_time":1663
      },
      {
         "text":"个",
         "phoneme":"null",
         "begin_index":10,
         "end_index":11,
         "begin_time":1663,
         "end_time":1750
      },
      {
         "text":"新",
         "phoneme":"null",
         "begin_index":11,
         "end_index":12,
         "begin_time":1750,
         "end_time":1950
      },
      {
         "text":"商",
         "phoneme":"null",
         "begin_index":12,
         "end_index":13,
         "begin_time":1950,
         "end_time":2188
      },
      {
         "text":"品",
         "phoneme":"null",
         "begin_index":13,
         "end_index":14,
         "begin_time":2188,
         "end_time":2538
      },
      {
         "text":"end",
         "phoneme":"null",
         "begin_index":0,
         "end_index":0,
         "begin_time":0,
         "end_time":0
      }
   ]
}

Tag relationships

<vhml/> is an empty tag.

<phoneme>

You can use this tag to control the pronunciation of the text within it. This tag is optional and is not supported for English text.

 <phoneme alphabet="string" ph="string">Chinese text</phoneme>

Attributes

Attribute

Type

Value

Required

Description

alphabet

String

py

Yes

"py" indicates Pinyin.

ph

String

The Pinyin string corresponding to the text within the tag.

Yes

Pinyin assignment rules:

  • The Pinyin of different characters must be separated by spaces. The number of Pinyin syllables must be equal to the number of characters.

  • Each Pinyin syllable consists of a sound and a tone. Tones are numbered from 1 to 5, where "5" indicates a neutral tone.

Examples

 <speak>
    去<phoneme alphabet="py" ph="dian3 dang4 hang2">典当行</phoneme>把这个玩意<phoneme alphabet="py" ph="dang4 diao4">当掉</phoneme>
 </speak>

Audio effect: SSML-phoneme.mp3

Tag relationships

The <phoneme> tag can contain text and the <vhml/> tag.

<soundEvent>

A sound cue tag. You can use this tag to insert a sound cue at any position during SSML synthesis.

 <soundEvent src="URL"/>

Attributes

Attribute

Type

Value

Required

Description

src

String

URL path of the sound cue resource.

Yes

Store custom audio in OSS and ensure that its URL is accessible over HTTP or HTTPS. To create a bucket, see Create a bucket. For file upload and sharing, see Console quick start.

Audio requirements:

  • 16 kHz sample rate, single-channel WAV format.

  • The file size cannot exceed 2 MB.

  • The bit depth must be 16-bit.

Important

You are legally responsible for the copyright of the audio you upload.

Examples

 <speak>
   一匹马受了惊吓<soundEvent src="http://nls.alicdn.com/sound-event/horse-neigh.wav"/>人们四散躲避
 </speak>

Audio effect: SSML-sound-event.mp3

Tag relationships

<soundEvent> is an empty tag and cannot contain any other tags.

<say-as>

This tag indicates the information type of the text within it, which allows the text to be pronounced according to the default method for that type.

 <say-as interpret-as="string">text</say-as>

Attributes

Attribute

Type

Value

Required

Description

interpret-as

String

cardinal, digits, telephone, name, address, id, characters, punctuation, date, time, currency, or measure

Yes

Indicates the information type of the text within the tag:

  • cardinal: Pronounced as an integer or decimal.

  • digits: Pronounced digit by digit.

  • telephone: Pronounced in the common way for telephone numbers.

  • name: Pronounced as a person's name.

  • address: Pronounces the text as an address.

  • id: Suitable for account names, nicknames, and so on.

  • characters: The text within the tag is read out character by character.

  • punctuation: The text within the tag is read out as punctuation marks.

  • date: Pronounced as a date.

  • time: Pronounced as a time.

  • currency: Pronounced as an amount of money.

  • measure: Pronounced as a unit of measurement.

Click to view supported say-as formats

cardinal

Chinese

Format

Example

Chinese output

Description

Number string

145

一百四十五

Integer input range: positive and negative integers up to 20 digits, from -99,999,999,999,999,999,999 to 99,999,999,999,999,999,999.

Decimal input range: No specific limit on the number of decimal places, but it is recommended to not exceed 10.

Minus sign + number string

-145

负一百四十五

3-digit number string separated by commas

10,000

一万

Minus sign + 3-digit number string separated by commas

-10,124

负一万一百二十四

Number string + decimal point + two zeros

10.00

十

Minus sign + number string + decimal point + two zeros

-110.00

负一百一十

Number string + decimal point + number string

79.090

七十九点零九零

Minus sign + number string + decimal point + number string

-79.001

负七十九点零零一

English

Format

Example

English output

Description

Number string

145

one hundred forty five

Integer input range: positive and negative integers up to 13 digits, from -999,999,999,999 to 999,999,999,999.

Decimal input range: No specific limit on the number of decimal places, but it is recommended to not exceed 10.

Number string starting with zero

0145

one hundred forty five

Minus sign + number string

-145

minus one hundred forty five

3-digit number string separated by commas

60,000

sixty thousand

Minus sign + 3-digit number string separated by commas

-208,000

minus two hundred eight thousand

Number string + decimal point + zero

12.00

twelve

Number string + decimal point + number string

12.34

twelve point three four

3-digit number string separated by commas + decimal point + number string

1,000.1

one thousand point one

Minus sign + number string + decimal point + number string

-12.34

minus twelve point three four

Minus sign + 3-digit number string separated by commas + decimal point + number string

-1,000.1

minus one thousand point one

(3-digit comma-separated) number string + hyphen + (3-digit comma-separated) number

1-1,000

one to one thousand

Other default readings

012.34

twelve point three four

None

1/2

one half

-3/4

minus three quarters

5.1/6

five point one over six

-3 1/2

minus three and a half

1,000.3^3

one thousand point three to the power of three

3e9.1

three times ten to the power of nine point one

23.10%

twenty three point one percent

digits

Chinese

Format

Example

Chinese output

Description

Number string

129090909

一二九零九零九零九

No specific limit on the length of the number string, but it is recommended to not exceed 20 digits.

If the number string exceeds 10 digits, a pause is inserted after each digit.

English

Format

Example

English output

Description

Number string

12034

one two zero three four

No specific limit on the length of the number string, but it is recommended to not exceed 20 digits.

When the number string is grouped by spaces or hyphens, a comma is inserted between groups to create a proper pause. Up to five groups are supported.

Number string + space or hyphen + number string + space or hyphen + number string + space or hyphen + number string

1-23-456 7890

one, two three, four five six, seven eight nine zero

telephone

Chinese

Format

Example

Chinese Outputs

Description

Landline number

4930286

四九三 零二八六

Supports 7- to 8-digit landline numbers. You can use spaces and hyphens (-) as separators.

A 7-digit landline number supports the 3-4 separation format. An 8-digit landline number supports the 4-4 separation format.

493 0286

四九三 零二八六

493-0286

四九三 零二八六

62552560

六二五五 二五六零

6255 2560

六二五五 二五六零

6255-2560

六二五五 二五六零

Landline number + extension number

4930286-109

四九三 零二八六 转幺零九

Supports 1- to 4-digit extension numbers.

4930286转109

四九三 零二八六 转幺零九

4930286分机109

四九三 零二八六 分机幺零九

4930286分机号109

四九三 零二八六 分机号幺零九

Area code + landline number

01062552560

零幺零 六二五五 二五六零

Supported area codes: 010, 02x, 03xx, 04xx, 05xx, 07xx, 08xx, 09xx.

010 62552560

零幺零 六二五五 二五六零

010 6255 2560

零幺零 六二五五 二五六零

010 6255-2560

零幺零 六二五五 二五六零

010-62552560

零幺零 六二五五 二五六零

010-6255-2560

零幺零 六二五五 二五六零

(010)62552560

零幺零 六二五五 二五六零

03198907098

零三幺九 八九零 七零九八

0319-8907098

三幺九 八九零 七零九八

Area code + landline number + extension number

010 62552560-109

零幺零 六二五五 二五六零 转幺零九

None

010-62552560-109

零幺零 六二五五 二五六零 转幺零九

(010)62552560-109

零幺零 六二五五 二五六零 转幺零九

(010)62552560转109

零幺零 六二五五 二五六零 转幺零九

(010)62552560分机109

零幺零 六二五五 二五六零 分机幺零九

(010)62552560分机号109

零幺零 六二五五 二五六零 分机号幺零九

Country code + area code + landline number

86-010-62791627

八六 零幺零 六二七九 幺六二七

Supported country codes include 86, (86), +86, (+86), and 0086. All are pronounced as "eight six".

(86)10-62791627

八六 幺零 六二七九 幺六二七

+86-010-62791627

八六 零幺零 六二七九 幺六二七

0086-10-62791627

八六 幺零 六二七九 幺六二七

(+86)-10-6279 1627

八六 幺零 六二七九 幺六二七

Country code + area code + landline number + extension number

(86)21-58118818-207

八六 二幺 五八幺幺 八八幺八 转二零七

None

(86)021-5811-8818-207

八六 零二幺 五八幺幺 八八幺八 转二零七

(86)021-58118818转207

八六 零二幺 五八幺幺 八八幺八 转二零七

(86)21-5811-8818分机207

八六 二幺 五八幺幺 八八幺八 分机二零七

+86-021-58118818分机号207

八六 零二幺 五八幺幺 八八幺八分机号二零七

Mobile number

139 0000 5678

幺三九 零零零零 五六七八

Supports 11-digit mobile numbers with 3-3-5 and 3-4-4 separation formats.

139-000-05678

幺三九 零零零 零五六七八

139 000 05678

幺三九 零零零 零五六七八

Country code + mobile number

+86-13900005678

八六 幺三九 零零零零 五六七八

None

(+86)-139-0000-5678

八六 幺三九 零零零零 五六七八

+8613900005678

八六 幺三九 零零零零 五六七八

0086-139 000 05678

八六 幺三九 零零零 零五六七八

Service number

123

幺二三

  • Supports common service numbers.

  • Supports 10-digit service numbers that start with 400 or 800, in a 3-3-4 separation format.

  • Supports 16-digit numbers that start with 12530, 17951, or 12593.

95678

九五六七八

4008110510

四零零 八幺幺 零五幺零

800-810-8888

八零零 八幺零 八八八八

1253013520638377

幺二五三零 幺三五 二零六三 八三七七

Other

(86)(21)9899-80800-0909

八六 二幺 九八九九 八零八零零 零九零九

Supports a format of a number string plus a separator, such as parentheses or a hyphen.

English

Format

Example

English output

Description

Number string

12034

one two oh three four

No specific limit on the length of the number string, but it is recommended to not exceed 20 digits. When the number string is grouped by spaces or hyphens, a comma is inserted between groups to create a proper pause. Up to five groups are supported.

Number string + space or hyphen + number string + space or hyphen + number string

1-23-456 7890

one, two three, four five six, seven eight nine oh

Plus sign + number string + space or hyphen + number string

+43-211-0567

plus four three, two one one, oh five six seven

Left parenthesis + number string + right parenthesis + space + number string + space or hyphen + number string

(21) 654-3210

(two one) six five four, three two one oh

address

Chinese

Format

Example

Chinese Output

Description

Common address format

元和镇嘉元30-9

元和镇嘉元三十杠九

Supports common address formats. In this context, an address refers to a standard mailing address.

市台路388弄1107-1108号

市台路三八八弄幺幺零七杠幺幺零八号

华润二十四城六期锦云府3-1-3205

华润二十四城六期锦云府三杠一杠三二零五

圣华名都大厦2幢2006室

圣华名都大厦二幢二零零六室

五常街道庭院5幢4单元201

五常街道庭院五幢四单元二零幺

芙蓉江路150弄19号

芙蓉江路幺五零弄十九号

English

This tag is not supported for English text.

id

Chinese

Format

Example

Output

Description

String

dell0101

D E L L 零 一 零 一

Supports uppercase and lowercase English letters, Arabic numerals 0-9, and underscores.

The space in the output indicates a pause between each character, meaning they are read one by one.

myid_1998

M Y I D 下划线 一 九 九 八

AiTest

A I T E S T

English

For English text, this tag functions the same as the characters type.

characters

Chinese

Format

Example

Chinese output

Description

String

ISBN 1-001-099098-1

I S B N 一 杠 零 零 一 杠 零 九 九 零 九 八 杠 一

Supports Chinese characters, uppercase and lowercase English letters, Arabic numerals 0-9, and some full-width and half-width characters.

The space in the output indicates a pause between each character, meaning they are read one by one. If the text within the tag contains special XML characters, you must escape them.

x10b2345_u

x 一 零 b 二 三 四 五 下划线 u

v1.0.1

v 一 点 零 点 一

版本号2.0

版本号二 点 零

苏M MA000

苏M M A 零 零 零

空中客车A330

空中客车A 三 三 零

型号s01 s02和s03

型号s 零 一 s 零二 和s 零 三

空中客车A330

空中客车A 三 三 零

αβγ

阿尔法 贝塔 伽玛

English

Format

Example

English output

Description

String

*b+3$.c-0'=α

asterisk B plus three dollar dot C dash zero apostrophe equals alpha

Supports Chinese characters, uppercase and lowercase English letters, Arabic numerals 0-9, and some full-width and half-width characters.

The space in the output indicates a pause between each character, meaning they are read one by one.

If the text within the tag contains special XML characters, you must escape them.

punctuation

Chinese

Format

Example

Chinese output

Description

Punctuation mark

…

省略号

Supports common Chinese and English punctuation. The space in the output indicates a pause between each character, meaning they are read one by one.

If the text within the tag contains special XML characters, you must escape them.

……

省略号

!"#$%&

叹号 双引号 井号 dollar 百分号 and

‘()*+

单引号 左括号 右括号 星号 加号

,-./:;

逗号 杠 点 斜杠 冒号 分号

<=>?@

小于 等号 大于 问号 at

[\]^_

左方括号 反斜线 右方括号 脱字符 下划线

English

For English text, this tag functions the same as the characters type.

date

Chinese

Format

Example

Chinese output

Description

xx年

71年

七一年

Supports 2-digit and 4-digit years. Details:

  • 2-digit years: 60-99, 00-09, 10-19.

  • 4-digit years: 1000-1999, 2000-2099.

04年

零四年

19年

一九年

1011年

一零一一年

1998年

一九九八年

2008年

二零零八年

xx年xx月

98年4月

九八年四月

For months 1 to 9, both formats with and without a leading "0" are supported. For example, "1908年4月" and "1908年04月".

1998年04月

一九九八年四月

08年8月

零八年八月

2008年8月

二零零八年八月

xx年xx月xx日xx年xx月xx号

98年4月23日

九八年四月二十三日

For days 1 to 9, both formats with and without a leading "0" are supported. For example, "1908年4月8日" and "1908年04月08日".

1998年04月23日

一九九八年四月二十三日

08年8月8号

零八年八月八号

2008年08月08号

二零零八年八月八号

xx年xx月xx日xx年xx月xx号

98年4月23日

九八年四月二十三日

For days 1 to 9, both formats with and without a leading "0" are supported. For example, "1908年4月8日" and "1908年04月08日".

1998年04月23日

一九九八年四月二十三日

08年8月8号

零八年八月八号

2008年08月08号

二零零八年八月八号

xx月xx号

3月20日

三月二十日

None

08月07号

八月七号

年月缩写

2018/08

二零一八年八月

Supports "/", "-", and "." as separators.

2018-08

二零一八年八月

2018.08

二零一八年八月

年月日缩写

2018/08/08

二零一八年八月八日

2018-8-8

二零一八年八月八日

2018.08.08

二零一八年八月八日

xx年xx月xx日~xx年xx月xx日xx年xx月xx号~xx年xx月xx号

04年9月1日~30日

零四年九月一日至三十日

Supports "~" and "-" as abbreviations for "to".

2004年09月01号-2008年06月08号

二零零四年九月一号至二零零八年六月八号

xx年xx月xx日~xx日xx年xx月xx号~xx号

04年9月1日~30日

零四年九月一日至三十日

2004年09月01号-2008年06月08号

二零零四年九月一号至二零零八年六月八号

xx年xx月~xx年xx月

01年04月~10年04月

零一年四月至一零年四月

2001年04月~2010年04月

二零零一年四月至二零一零年四月

xx月xx日~xx月xx日xx月xx号~xx月xx号

10月1日~10月7日

十月一日至十月七日

10月01号~10月07号

十月一号至十月七号

xx月xx日~xx日xx月xx号~xx号

10月1日~7日

十月一日至七日

10月01号~07号

十月一号至七号

年月日缩写~年月日缩写

2018/03/03~2019/01/01

二零一八年三月三日至二零一九年一月一日

Supports "/" and "." as separators, and "~" and "-" as abbreviations for "to".

1997.9.9~1998.9.9

一九九七年九月九日至一九九八年九月九日

月日缩写~月日缩写

10/20~10/31

十月二十日至十月三十一日

xx~xx月xx月~xx月

1~10月

一至十月

1月~10月

一月至十月

月日年缩写

10/20/2018

二零一八年十月二十日

Only 4-digit years are supported. Only "/" is supported as a separator. Only "MM/DD/YYYY" format is supported.

English

Format

Example

English output

Description

YYYY/MM or YYYY-MM

2000/01

two thousand, oh one

Spans multiple years.

1900-01

nineteen hundred, oh one

2001-02

twenty oh one, oh two

2019-20

twenty nineteen, twenty

1998-99

nineteen ninety eight, ninety nine

1999-00

nineteen ninety nine, oh oh

Four-digit number starting with 1 or 2

2000

two thousand

Four-digit year.

1900

nineteen hundred

1905

nineteen oh five

2021

twenty twenty one

Day of the week

or

Day of the week range

or

Day&Day

mon-wed

monday to wednesday

For a range of days, if the text within the tag contains special XML characters, you must escape them.

tue~fri

tuesday to friday

sat&sun

saturday and sunday

DD-DD MMM, YYYY

or

DD~DD MMM, YYYY

or

DD&DD MMM, YYYY

19-20 Jan, 2000

the nineteenth to the twentieth of january two thousand

DD is a two-digit day, MMM is a three-letter abbreviation or full word for the month, and YYYY is a four-digit year starting with 1 or 2.

01 ~ 10 Jul, 2020

the first to the tenth of july twenty twenty

05&06 Apr, 2009

the fifth and the sixth of april two thousand nine

MMM DD-DD

or

MMM DD~DD

or

MMM DD&DD

Feb 01 - 03

february the first to the third

MMM is a three-letter abbreviation or full word for the month, and DD is a two-digit day.

Aug 10~20

august the tenth to the twentieth

Dec 11&12

december the eleventh and the twelfth

MMM-MMM

or

MMM~MMM

or

MMM&MMM

Jan-Jun

january to june

MMM is a three-letter abbreviation or full word for the month.

jul ~ dec

july to december

sep&oct

september and october

YYYY-YYYY

or

YYYY~YYYY

1990 - 2000

nineteen ninety to two thousand

YYYY is a four-digit year starting with 1 or 2.

2001~2021

two thousand one to twenty twenty one

WWW DD MMM YYYY

Sun 20 Nov 2011

sunday the twentieth of november twenty eleven

WWW is a three-letter abbreviation or full word for the day of the week. DD is a two-digit day. MMM is a three-letter abbreviation or full word for the month. MM is a two-digit month (or three-letter abbreviation or full word). YYYY is a four-digit year starting with 1 or 2.

WWW DD MMM

Sun 20 Nov

sunday the twentieth of november

WWW MMM DD YYYY

Sun Nov 20 2011

sunday november the twentieth twenty eleven

WWW MMM DD

Sun Nov 20

sunday november the twentieth

WWW YYYY-MM-DD

Sat 2010-10-01

aturday october the first twenty ten

WWW YYYY/MM/DD

Sat 2010/10/01

saturday october the first twenty ten

WWW MM/DD/YYYY

Sun 11/20/2011

sunday november the twentieth twenty eleven

MM/DD/YYYY

11/20/2011

november the twentieth twenty eleven

YYYY

1998

nineteen ninety eight

Other default readings

10 Mar, 2001

the tenth of march two thousand one

None

10 Mar

the tenth of march

Mar 2001

march two thousand one

Fri. 10/Mar/2001

friday the tenth of march two thousand one

Mar 10th, 2001

march the tenth two thousand one

Mar 10

march the tenth

2001/03/10

march the tenth two thousand one

2001-03-10

march the tenth two thousand one

2000s

two thousands

2010's

twenty tens

1900's

nineteen hundreds

1990s

nineteen nineties

time

Chinese

Format

Example

Chinese output

Description

时刻

12:00

十二点

Supports common time and time range formats.

12:00:00点

十二点

10:20分

十点二十分

10:20:30

十点二十分三十秒

09:18:14

九点十八分十四秒

时刻~时刻

11:00~12:00

十一点到十二点

09:00-14:00

九点到十四点

11:00~11:30

十一点到十一点三十分

11:00-12:18

十一点到十二点十八分

10:30~11:00

十点三十分到十一点

09:28-10:00

九点二十八分到十点

10:20~11:20

十点二十分到十一点二十分

06:00~08:00

六点到八点

上午10:20~下午13:30

上午十点二十分到下午十三点三十分

时间缩写

5:00 am

凌晨五点整

5:30 am

凌晨五点半

5:20:12 am

凌晨五点二十分十二秒

7:00 am

上午七点整

7:30 AM

上午七点半

7:20:12 a.m.

上午七点二十分十二秒

07:08:12 A.M.

上午七点零八分十二秒

5:00 pm

下午五点整

5:30 PM

下午五点半

5:20:12 p.m.

下午五点二十分十二秒

05:09:12 P.M.

下午五点零九分十二秒

9:00 pm

晚上九点整

9:30 pm

晚上九点半

9:20:12 PM

晚上九点二十分十二秒

9:02:12 P.M.

晚上九点零二分十二秒

12:00 pm

中午十二点整

12:30 p.m.

中午十二点半

12:20:12 PM

中午十二点二十分十二秒

English

Format

Example

English output

Description

HH:MM AM or PM

09:00 AM

nine A M

HH is a one- or two-digit hour, MM is a two-digit minute, and AM/PM indicates morning/afternoon.

09:03 PM

nine oh three P M

09:13 p.m.

nine thirteen p m

HH:MM

21:00

twenty one hundred

HHMM

100

one o'clock

Time-Time

8:00 am - 05:30 pm

eight a m to five p m

Supports common time formats and ranges.

7:05~10:15 AM

seven oh five to ten fifteen A M

09:00-13:00

nine o'clock to thirteen hundred

currency

Chinese

Format

Example

Chinese output

Description

Number + currency identifier

12.00 RMB

十二人民币

Supports AUD (Australian dollar), CAD (Canadian dollar), HKD (Hong Kong dollar), JPY (Japanese yen), USD (US dollar), HKD (Hong Kong dollar), JPY (Japanese yen), USD (US dollar), CHF (Swiss franc), NOK (Norwegian krone), SEK (Swedish krona), GBP (British pound), CNY (renminbi), CNY (yuan), and EUR (euro).

Supported number formats include integers, decimals, and the international format with comma separators.

12.50 RMB

十二点五零人民币

12,000,000 RMB

一千二百万人民币

12,000,000.00 RMB

一千二百万人民币

12,000.35 RMB

一万两千点三五人民币

Currency identifier + number

$12

十二美元

Supports CAD (Canadian dollar), $ (dollar), Fr (franc), kr (Danish krone), £ (pound), ¥ (yuan), and € (euro).

Supported number formats include integers, decimals, and the international format with comma separators.

$12.00

十二美元

$12.12

二点一二美元

$12,000

一万两千美元

$12,000.00

一万两千美元

$12,000.99

一万两千点九九美元

Other default readings

1213

一千二百一十三

None

1213 KML

一千二百一十三K M L

1213.00 KML

一千二百一十三K M L

1213.9 KML

一千二百一十三点九K M L

1,000 KML

一千K M L

1,000.00 KML

一千K M L

1,000.98 KML

一千点九八K M L

12,000

一万两千

English

Format

Example

English output

Description

Number + currency identifier

1.00 CNY

one yuan

Supported number formats: integers, decimals, and the international format with comma separators.

Supported currency identifiers:

CN¥ (yuan)

CNY (yuan)

CNY (yuan)

AUD (australian dollar)

CAD (canadian dollar)

CHF (swiss franc)

DKK (danish krone)

EUR (euro)

GBP (british pound)

HKD (Hong Kong dollar)

JPY (japanese yen)

NOK (norwegian krone)

SEK (swedish krona)

SGD (singapore dollar)

USD (united states dollar)

2.02 CNY

two point zero two yuan

1,000.23 CN¥

one thousand point two three yuan

1.01 SGD

one singapore dollar and one cent

2.01 CAD

two canadian dollars and one cent

3.1 HKD

three hong kong dollars and ten cents

1,000.00 EUR

one thousand euros

Currency identifier + number

US$ 1.00

one US dollar

Supported number formats: integers, decimals, and the international format with comma separators.

Supported currency identifiers:

US$ (US dollar)

CA$ (Canadian dollar)

AU$ (Australian dollar)

SG$ (Singapore dollar)

HK$ (Hong Kong dollar)

C$ (Canadian dollar)

A$ (Australian dollar)

$ (dollar)

£ (pound)

€ (euro)

CN¥ (yuan)

CNY (yuan)

CNY (yuan)

AUD (australian dollar)

CAD (canadian dollar)

CHF (swiss franc)

DKK (danish krone)

EUR (euro)

GBP (british pound)

HKD (Hong Kong dollar)

JPY (japanese yen)

NOK (norwegian krone)

SEK (swedish krona)

SGD (singapore dollar)

USD (united states dollar)

$0.01

one cent

JPY 1.01

one japanese yen and one sen

£1.1

one pound and ten pence

€2.01

two euros and one cent

USD 1,000

one thousand united states dollars

Number + quantifier + currency identifier

or

Currency identifier + number + quantifier

1.23 Tn CNY

one point two three trillion yuan

Supported quantifier formats include the following:

thousand

million

billion

trillion

Mil (million)

mil (million)

Bil (billion)

bil (billion)

MM (million)

Bn (billion)

bn (billion)

Tn (trillion)

tn (trillion)

K(thousand)

k (thousand)

M (million)

m (million)

$1.2 K

one point two thousand dollars

measure

Chinese

Format

Example

Chinese output

Description

Number + Chinese unit

2片

两片

Supports common Chinese units and unit abbreviations.

120公顷

一百二十公顷

100多毫克

一百多毫克

100来米

一百来米

100余人

一百余人

1厘米20毫米

一厘米二十毫米

120.00平方公里

一百二十平方公里

Number + unit abbreviation

120.56 cm²

一百二十点五六平方厘米

120 ㎡ 56 cm²

一百二十平方米五十六平方厘米

100 m 12 cm 6 mm

一百米十二厘米六毫米

Range

10~15 kg

十至十五千克

10.24~789.82亩

十点二四至七百八十九点八二亩

10米~15米

十米至十五米

10.24 cm~19.08 cm

十点二四厘米至十九点零八厘米

Number + unit + "/" + unit

10元/斤

十元每斤

199~299元/件

一百九十九至二百九十九元每件

299.99元/g~399.99元/g

二百九十九点九九元每克至三百九十九点九九元每克

Other default readings

12扎

十二扎

30 rm

三十r m

4万万同胞

四万万同胞

12.897微克

十二点八九七微克

English

Format

Example

English output

Description

Number + unit of measure

1.0 kg

one kilogram

Supported number formats: integers, decimals, and the international format with comma separators.

Supports common unit abbreviations.

1,234.01 km

one thousand two hundred thirty four point zero one kilometres.

Unit of measure

mm2

square millimetre

Common symbols

Symbol

Chinese reading

English reading

!

叹号

exclamation mark

“

双引号

double quote

#

井号

pound

$

dollar

dollar

%

百分号

percent

&

and

and

‘

单引号

left quote

(

左括号

left parenthesis

)

右括号

right parenthesis

*

星

asterisk

+

加

plus

,

逗号

comma

-

杠

dash

.

点

dot

/

斜杠

slash

:

零冒号

colon

;

分号

semicolon

<

小于

less than

=

等号

equals

>

大于

greater than

?

问号

question mark

@

at

at

[

左方括号

left bracket

\

反斜线

back slash

]

右方括号

right bracket

^

脱字符

caret

_

下划线

underscore

`

反引号

back quote

{

左花括号

left brace

|

竖线

vertical bar

}

右花括号

right brace

~

波浪线

tilde

!

叹号

exclamation mark

“

左双引号

left double quote

”

右双引号

right double quote

‘

左单引号

left quote

’

右单引号

right quote

(

左括号

left parenthesis

)

右括号

right parenthesis

,

逗号

comma

。

句号

full stop

—

杠

em dash

:

冒号

colon

;

分号

semicolon

?

问号

question mark

、

顿号

enumeration comma

…

省略号

ellipsis

……

省略号

ellipsis

《

左书名号

left guillemet

》

右书名号

right guillemet

¥

人民币符号

yuan

≥

大于等于

greater than or equal to

≤

小于等于

less than or equal to

≠

不等于

not equal

≈

约等于

approximately equal

±

加减

plus or minus

×

乘

times

π

派

pi

Α

阿尔法

alpha

Β

贝塔

beta

Γ

伽玛

gamma

Δ

德尔塔

delta

Ε

艾普西龙

epsilon

Ζ

捷塔

zeta

Θ

西塔

theta

Ι

艾欧塔

iota

Κ

喀帕

kappa

∧

拉姆达

lambda

Μ

缪

mu

Ν

拗

nu

Ξ

克西

ksi

Ο

欧麦克轮

omicron

∏

派

pi

Ρ

柔

rho

∑

西格玛

sigma

Τ

套

tau

Υ

宇普西龙

upsilon

Φ

fai

phi

Χ

器

chi

Ψ

普赛

psi

Ω

欧米伽

omega

α

阿尔法

alpha

β

贝塔

beta

γ

伽玛

gamma

δ

德尔塔

delta

ε

艾普西龙

epsilon

ζ

捷塔

zeta

η

依塔

eta

θ

西塔

theta

ι

艾欧塔

iota

κ

喀帕

kappa

λ

拉姆达

lambda

μ

缪

mu

ν

拗

nu

ξ

克西

ksi

ο

欧麦克轮

omicron

π

派

pi

ρ

柔

rho

σ

西格玛

sigma

τ

套

tau

υ

宇普西龙

upsilon

φ

fai

phi

χ

器

chi

ψ

普赛

psi

ω

欧米伽

omega

Common units

Format

Category

Chinese example

English example

Abbreviation

Length

nm(纳米)、μm(微米)、 mm(毫米)、cm(厘米)、m(米)、km(千米)、ft(英尺)、in(英寸)

nm (nanometre), μm (micrometre), mm (millimetre), cm (centimetre), m (metre), km (kilometre), ft (foot), in (inch)

Area

cm²(平方厘米)、㎡(平方米)、km²(平方千米)、SqFt(平方英尺)

cm² (square centimetre), ㎡ (square metre), km2 (square kilometre), SqFt (square foot)

Volume

cm³(立方厘米)、m³(立方米)、km³(立方千米)、mL(毫升)、L(升)、gallon(加仑)

cm³ (cubic centimetre), m³ (cubic metre), km3 (cubic kilometre), mL (millilitre), L (litre), gal (gallon)

Weight

μg(微克)、mg(毫克)、g(克)、kg(千克)

μg (microgram), mg (milligram), g (gram), kg (kilogram)

Time

min(分)、sec(秒)、ms(毫秒)

min (minute), sec (second), ms (millisecond)

Electromagnetic

μA(微安)、mA(毫安)、Ω(欧姆)、Hz(赫兹)、kHz(千赫兹)、MHz(兆赫兹)、GHz(吉赫兹)、V(伏)、kV(千伏)、kWh(千瓦时)

μA (microamp), mA (milliamp), Hz (hertz), kHz (kilohertz), MHz (megahertz), GHz (gigahertz), V (volt), kV (kilovolt), kWh (kilowatt hour)

Sound

dB(分贝)

dB (decibel)

Atmospheric pressure

Pa(帕)、kPa(千帕)、Mpa(兆帕)

Pa (pascal), kPa (kilopascal), MPa (megapascal)

Other common units

Other Chinese units are also supported, such as “米”, “秒”, “美元”, and “毫升每瓶”, as well as classifiers such as “架”, “场”, “头”, “部”, and “盆”.

Other units are also supported, such as tsp (teaspoon), rpm (revolutions per minute), KB (kilobyte), and mmHg (millimetre of mercury).

Examples

cardinal

<speak>
  <say-as interpret-as="cardinal">12345</say-as>
</speak>

Audio effect in Chinese: SSML-say-as_Cardinal.mp3

<speak>
  <say-as interpret-as="cardinal">10234</say-as>
</speak>

Audio effect in English: en-SSML-say-as_cardinal.mp3

digits

<speak>
  <say-as interpret-as="digits">12345</say-as>
</speak>

Audio effect in Chinese: SSML-say-as_digit.mp3

<speak>
  <say-as interpret-as="digits">10234</say-as>
</speak>

Audio effect in English: en-SSML-say-as_digits.mp3

telephone

<speak>
  <say-as interpret-as="telephone">12345</say-as>
</speak>

Audio effect in Chinese: SSML-say-as_Telephone.mp3

<speak>
  <say-as interpret-as="telephone">10234</say-as>
</speak>

Audio effect in English: en-SSML-say-as_telephone.mp3

name

<speak>
  她的曾用名是<say-as interpret-as="name">曾小凡</say-as>
</speak>

Audio effect: SSML-say-as_Name.mp3

address

<speak>
  <say-as interpret-as="address">富路国际1号楼3单元304</say-as>
</speak>

Audio effect: SSML-say-as_Address.mp3

id

<speak>
  <say-as interpret-as="id">myid_1998</say-as>
</speak>

Audio effect: SSML-say-as_id.mp3

characters

<speak>
  <say-as interpret-as="characters">希腊字母αβ</say-as>
</speak>

Audio effect in Chinese: SSML-say-as_characters.mp3

<speak>
  <say-as interpret-as="characters">*b+3.c$=α</say-as>
</speak>

Audio effect in English: en-SSML-say-as_characters.mp3

punctuation

<speak>
  <say-as interpret-as="punctuation"> -./:;</say-as>
</speak>

Audio effect: SSML-say-as_punctuation.mp3

date

<speak>
  <say-as interpret-as="date">1000-10-10</say-as>
</speak>

Audio effect in Chinese: SSML-say-as_date.mp3

<speak>
  <say-as interpret-as="date">10-01-2020</say-as>
</speak>

Audio effect in English: en-SSML-say-as_date.mp3

time

<speak>
  <say-as interpret-as="time">5:00am</say-as>
</speak>

Audio effect in Chinese: SSML-say-as_time.mp3

<speak>
  <say-as interpret-as="time">0500</say-as>
</speak>

Audio effect in English: en-SSML-say-as_time.mp3

currency

<speak>
  <say-as interpret-as="currency">13,000,000.00RMB</say-as>
</speak>

Audio effect in Chinese: SSML-say-as_currency.mp3

<speak>
  <say-as interpret-as="currency">$1,000.01</say-as>
</speak>

Audio effect in English: en-SSML-say-as_currency.mp3

measure

<speak>
  <say-as interpret-as="measure">100m12cm6mm</say-as>
</speak>

Audio effect in Chinese: SSML-say-as_measure.mp3

<speak>
  <say-as interpret-as="measure">1,000.01kg</say-as>
</speak>

Audio effect in English: en-SSML-say-as_measure.mp3

Tag relationships

The <say-as> tag can contain text and the <vhml/> tag.

Comprehensive example

The following example combines multiple SSML tags. Audio effect: Comprehensive example.mp3.

Important
  • The narrator's voice in the sample audio is a custom voice that is not yet publicly available. To try custom voices, see Speech Synthesis Voice Customization.

  • Each short-text synthesis request can contain no more than 300 characters and one <speak> root element. The following example contains multiple <speak> fragments. Submit the fragments separately for short-text synthesis.

<speak>
  相传北宋年间,
  <say-as interpret-as="date">1121-10-10</say-as>,
  <say-as interpret-as="address">开封城</say-as>
  郊外的早晨笼罩在一片
  <sub alias="双十一">11.11</sub>
  前买买买的欢乐海洋中。一支运货的骡队刚进入城门
  <soundEvent src="http://nls.alicdn.com/sound-event/bell.wav"/>
  一个肤白貌美
  <phoneme alphabet="py" ph="de5">地</phoneme>
  姑娘便拦下第一排的小哥<say-as interpret-as="name">阿发。</say-as>
</speak>

<speak voice="xiaomei">
  “亲,本店今日特惠,鞋履全场
  <say-as interpret-as="digits">199</say-as>
  减
  <say-as interpret-as="cardinal">100</say-as>,
  走过路过不要错过”。
</speak>

<speak voice="sicheng" rate="150">
  “不啦不啦,赶着上货,已经
  <say-as interpret-as="time">09:59:59</say-as>
  了,再晚就供应链断裂了”。
</speak>

<speak>
  <say-as interpret-as="name">阿发</say-as>
  擦了擦汗,带着运货队伍,径直穿过闹巷,耳边充斥着各种叫卖声:
</speak>

<speak voice="ninger" rate="200">
  最新花色现染布匹,买两尺送一尺;
</speak>

<speak voice="xiaobei">
  爆款纱帽头盔,7天无理由退货;
</speak>

<speak voice="sijia">
  专治大小方脉,调理男人妇人疑难杂症。
</speak>

<speak>
  突然,一匹马不知怎么受了惊,在路上嘶鸣狂奔
  <soundEvent src="http://nls.alicdn.com/sound-event/horse-neigh.wav"/>
  一个孩子也吓坏了,跌跌撞撞地扑向大人怀里
  <break time="50ms"/>大喊道:
</speak>

<speak voice="sitong" rate="150">
  “妈妈,妈妈!”
</speak>

<speak>
  这时,
  <say-as interpret-as="name">阿发</say-as>
  心想
</speak>

<speak effect="robot" pitch="-100">
  “吓死宝宝了!”
</speak>

<speak>
  于是他赶紧捂住了
  <phoneme alphabet="py" ph="he2 bao1">钱包</phoneme>,
  继续赶路送货。一路上,
  <say-as interpret-as="address">开封城</say-as>
  的繁荣景象给
  <say-as interpret-as="name">阿发</say-as>
  留下了深刻的印象。
</speak>

<speak bgm="http://nls.alicdn.com/bgm/2.wav" backgroundMusicVolume="30" rate="-200">
  物换星移,繁华落尽,于是他在购物狂欢之余握起画笔,勾勒出一幅长卷,并命名为《清明上河图》。
</speak>