Use SSML to control voice characteristics such as speech rate, pitch, and volume, and use LaTeX to read Chinese mathematical formulas aloud. This article introduces the supported scope, invocation examples, and tag and symbol references.
Feature overview
SSML is an XML-based speech synthesis markup language that can set voice characteristics such as timbre, speaking rate, pitch, and volume, control pauses, specify pronunciation and reading styles, and add background music and sound effects. The LaTeX formula reading feature of CosyVoice converts mathematical formulas in text into Chinese speech.
These two features can be used for audiobooks, customer service information announcements, multilingual pronunciation, and online education. The applicable models, voices, and interfaces for each feature are described below. For model selection, see Speech synthesis.
Limits
- SSML
- LaTeX
- Supported models: qwen-audio-3.1-tts-plus, qwen-audio-3.1-tts-flash, qwen-audio-3.0-tts-flash, qwen-audio-3.0-tts-plus, cosyvoice-v3.5-flash, cosyvoice-v3.5-plus, cosyvoice-v3-flash, cosyvoice-v3-plus, cosyvoice-v2
- Voices: Only cloned voices and the system voices marked as supporting SSML in the Qwen-Audio-TTS voice list and CosyVoice voice list are available.
-
Interfaces:
- Java SDK (v2.20.3 or later): supports non-streaming calls and one-way streaming calls
- Python SDK (v2.0.1 or later): supports non-streaming calls and one-way streaming calls
- WebSocket API: you must set the
enable_ssmlparameter totrue, and the continue-task event can be sent only once
Usage
- SSML
- LaTeX
When using SSML, follow these rules:
- All text must be placed in
<speak></speak>. Multiple<speak>tags can be used side by side; nesting is not supported. - Special XML characters inside tags must be escaped:
"→",'→',&→&,<→<,>→>.
QuickStart
The following example shows how to use SSML to control the speaking rate for speech synthesis. Before running it, complete the following preparations:- Obtain and configure an API Key
- Install the DashScope SDK (Python 2.0.1 or later, Java 2.20.3 or later). For details, see Install the SDK.
- Java SDK
- Python SDK
- WebSocket API
SSML tags
The implementation references the W3C SSML 1.0 specification. The supported tags are subject to the descriptions below; not all standard tags are supported.
<speak>: root node
<speak> is the root node of all SSML tags. When you use SSML features, the text content must be enclosed in <speak></speak> tags.
- Attributes
- Examples
- Tag relationships
| Attribute name | Attribute type | Required | Description |
|---|---|---|---|
voice | String | No | Specifies the speaker (voice).This attribute takes precedence over the speaker specified by the voice API request parameter.
|
rate | String | No | Specifies the speech rate. This attribute takes precedence over the speech rate specified by the API request parameter rate.
|
pitch | String | No | Specifies the pitch. This attribute takes precedence over the pitch specified by the API request parameter pitch.
|
volume | String | No | Specifies the volume. This attribute takes precedence over the volume specified by the API request parameter volume.
|
effect | String | No | Specifies the sound effect.
|
effectValue | String | No | Used to further configure the specific effects of the sound effect (the effect parameter), applicable to the three advanced sound effect types: eq, lpfilter, and hpfilter.
|
bgm | String | No | Adds background music to the synthesized speech.The audio file must be stored on Alibaba Cloud OSS and be accessible via a public network URL. For how to upload files, see Upload files. For private files, use a valid signed URL. XML special characters in the URL must be escaped; for example, write & as &.
|
backgroundMusicVolume | String | No | Specifies the volume of the background music. Must be used together with the bgm attribute. |
<break>: controls the pause
Inserts a silent pause during speech synthesis to simulate a natural pause in speaking. Supports two units: seconds (s) and milliseconds (ms).
- Attributes
- Examples
- Tag relationships
| Attribute name | Attribute type | Required | Description |
|---|---|---|---|
time | String | No | Sets the pause duration, supporting both seconds and milliseconds (for example, "2s" or "50ms").
<break> tags are used consecutively, the total pause duration is the sum of the durations of each tag. If the total exceeds 10 seconds, only the first 10 seconds are retained. |
<break> tag without attributes pauses for 1 second by default.<sub>: substitute text
Replaces the specified text with content more suitable for reading aloud. For example, read "W3C" as "network protocol standards".
- Attributes
- Examples
- Tag relationships
| Attribute name | Attribute type | Required | Description |
|---|---|---|---|
alias | String | Yes | Specifies the spoken content that replaces the original text. |
<phoneme>: specify pronunciation
Precisely controls how text is pronounced. For Chinese, pronunciation can be specified with pinyin; for English, CMU phonetic symbols can be used. It applies to scenarios such as disambiguating polyphonic characters and pronouncing foreign words.
- Attributes
- Examples
- Tag relationships
| Attribute name | Attribute type | Required | Description |
|---|---|---|---|
alphabet | String | Yes | Specifies the pronunciation type: pinyin (for Chinese) or phonetic symbols (for English).Value range:
|
ph | String | Yes | Specifies the specific pinyin or phonetic symbols. Usage rules:
|
<soundEvent>: Insert a sound effect
Inserts a sound effect file (such as a prompt tone or ambient sound) at a specified position in the speech to enrich the expressiveness of the voice.
- Attributes
- Examples
- Tag relationships
| Attribute name | Attribute type | Required | Description |
|---|---|---|---|
src | String | Yes | Specifies the URL of an external audio file.The audio file must be stored on Alibaba Cloud OSS and be accessible via a public network URL. For how to upload files, see Upload files. For private files, use a valid signed URL. XML special characters in the URL must be escaped; for example, write & as &.
|
<say-as>: Set reading rules
Specifies the content type of the text (such as numbers, dates, or phone numbers), and the system reads it aloud according to the standard reading rules for the corresponding type.
- Attributes
- Examples
- Tag relationships
| Attribute name | Attribute type | Required | Description |
|---|---|---|---|
interpret-as | String | Yes | Specifies the content type of the text within the tag.Value range:
|
Click to view the supported scope of say-as
Click to view the supported scope of say-as
cardinal
digits
telephone
address
id
characters
punctuation
date
time
currency
measure
Common symbols
Common measurement units
- Chinese
- English
| Format | Examples | Chinese output | Description |
|---|---|---|---|
| Digit string | 145 | One hundred and forty-five | Integer input range: positive and negative integers within 20 digits, [-99999999999999999999,99999999999999999999]. Decimal input range: there is no special limit on the number of digits after the decimal point, but no more than 10 digits are recommended. |
| Minus sign + digit string | -145 | Minus one hundred and forty-five | |
| Digit string separated by commas every 3 digits | 10,000 | Ten thousand | |
| Minus sign + digit string separated by commas every 3 digits | -10,124 | Minus ten thousand one hundred and twenty-four | |
| Digit string + decimal point + 2 zeros | 10.00 | Ten | |
| Minus sign + digit string + decimal point + 2 zeros | -110.00 | Minus one hundred and ten | |
| Digit string + decimal point + digit string | 79.090 | Seventy-nine point zero nine zero | |
| Minus sign + digit string + decimal point + digit string | -79.001 | minus seventy-nine point zero zero one |
- Chinese
- English
| Format | Examples | Chinese output | Description |
|---|---|---|---|
| Digit string | 129090909 | one two nine zero nine zero nine zero nine | There is no special limit on the length of the digit string; no more than 20 digits are recommended. When the digit string exceeds 10 digits, a pause is inserted after each digit. |
- Chinese
- English
| Format | Examples | Chinese output | Description |
|---|---|---|---|
| Landline number | 4930286 | four nine three zero two eight six | Supports 7~8-digit landline numbers, with spaces and "-" supported as separators. Specifically, 7-digit landline numbers support the "3-4" digit grouping format; 8-digit landline numbers support the "4-4" digit grouping format. |
| 493 0286 | four nine three zero two eight six | ||
| 493-0286 | four nine three zero two eight six | ||
| 62552560 | six two five five two five six zero | ||
| 6255 2560 | six two five five two five six zero | ||
| 6255-2560 | six two five five two five six zero | ||
| Landline number + extension number | 4930286-109 | four nine three zero two eight six transfer one zero nine | Supports 1~4-digit extension numbers. |
| 4930286 transfer 109 | four nine three zero two eight six transfer one zero nine | ||
| 4930286 extension 109 | four nine three zero two eight six extension one zero nine | ||
| 4930286 extension 109 | four nine three zero two eight six extension one zero nine | ||
| Area code + landline number | 01062552560 | zero one zero six two five five two five six zero | Supported area codes: 010, 02x, 03xx, 04xx, 05xx, 07xx, 08xx, 09xx. |
| 010 62552560 | zero one zero six two five five two five six zero | ||
| 010 6255 2560 | zero one zero six two five five two five six zero | ||
| 010 6255-2560 | zero one zero six two five five two five six zero | ||
| 010-62552560 | zero one zero six two five five two five six zero | ||
| 010-6255-2560 | zero one zero six two five five two five six zero | ||
| (010)62552560 | zero one zero six two five five two five six zero | ||
| 03198907098 | zero three one nine eight nine zero seven zero nine eight | ||
| 0319-8907098 | three one nine eight nine zero seven zero nine eight | ||
| Area code + landline number + extension number | 010 62552560-109 | zero one zero six two five five two five six zero ext. one zero nine | None |
| 010-62552560-109 | zero one zero six two five five two five six zero ext. one zero nine | ||
| (010)62552560-109 | zero one zero six two five five two five six zero ext. one zero nine | ||
| (010)62552560 ext. 109 | zero one zero six two five five two five six zero ext. one zero nine | ||
| (010)62552560 ext. 109 | zero one zero six two five five two five six zero ext. one zero nine | ||
| (010)62552560 extension 109 | zero one zero six two five five two five six zero extension one zero nine | ||
| Country code + area code + landline number | 86-010-62791627 | eight six zero one zero six two seven nine one six two seven | Supported country codes: 86, (86), +86, (+86), 0086. All are uniformly read as "eight six". |
| (86)10-62791627 | eight six one zero six two seven nine one six two seven | ||
| +86-010-62791627 | eight six zero one zero six two seven nine one six two seven | ||
| 0086-10-62791627 | eight six one zero six two seven nine one six two seven | ||
| (+86)-10-6279 1627 | eight six one zero six two seven nine one six two seven | ||
| Country code + area code + landline number + extension number | (86)21-58118818-207 | eight six two one five eight one one eight eight one eight ext. two zero seven | None |
| (86)021-5811-8818-207 | eight six zero two one five eight one one eight eight one eight ext. two zero seven | ||
| (86)021-58118818 ext. 207 | eight six zero two one five eight one one eight eight one eight ext. two zero seven | ||
| (86)21-5811-8818 ext. 207 | eight six two one five eight one one eight eight one eight extension two zero seven | ||
| +86-021-58118818 extension 207 | eight six zero two one five eight one one eight eight one eight extension number two zero seven | ||
| Mobile number | 139 0000 5678 | one three nine zero zero zero zero five six seven eight | Supports 11-digit mobile numbers, with two digit grouping formats: 3-3-5 and 3-4-4 |
| 139-000-05678 | one three nine zero zero zero zero five six seven eight | ||
| 139 000 05678 | one three nine zero zero zero zero five six seven eight | ||
| Country code + mobile phone number | +86-13900005678 | 86 139 0000 5678 | None |
| (+86)-139-0000-5678 | 86 139 0000 5678 | ||
| +8613900005678 | 86 139 0000 5678 | ||
| 0086-139 000 05678 | 86 139 000 05678 | ||
| Service number | 123 | 123 | Common service numbers are supported. 10-digit service numbers starting with 400/800 are supported, with digits grouped in the "3-3-4" format. 16-digit numbers starting with 12530/17951/12593 are supported. |
| 95678 | 95678 | ||
| 4008110510 | 400 811 0510 | ||
| 800-810-8888 | 800 810 8888 | ||
| 1253013520638377 | 12530 135 2063 8377 | ||
| Others | (86)(21)9899-80800-0909 | 86 21 9899 80800 0909 | The "digit string + separator (left and right parentheses, -)" format is supported. |
- Chinese
- English
| Format | Examples | Chinese output | Description |
|---|---|---|---|
| Common address formats | Jiayuan 30-9, Yuanhe Town | Jiayuan 30-9, Yuanhe Town | Common address formats are supported. Here, an address refers to a standard mailing address. |
| No. 1107-1108, Lane 388, Shitai Road | No. 1107-1108, Lane 388, Shitai Road | ||
| 3-1-3205, Jinyun Mansion, Phase 6, Huarun 24 City | 3-1-3205, Jinyun Mansion, Phase 6, Huarun 24 City | ||
| Room 2006, Block 2, Shenghua Mingdu Tower | Room 2006, Block 2, Shenghua Mingdu Tower | ||
| Room 201, Unit 4, Building 5, Tingyuan, Wuchang Subdistrict | Room 201, Unit 4, Building 5, Tingyuan, Wuchang Subdistrict | ||
| No. 19, Lane 150, Furongjiang Road | No. nineteen, Lane one five zero, Furongjiang Road |
- Chinese
- English
| Format | Examples | Chinese output | Description |
|---|---|---|---|
| string | dell0101 | D E L L zero one zero one | Uppercase and lowercase English letters, Arabic numerals 0~9, and underscores. The spaces in the output indicate a pause inserted between each character, that is, the characters are read one by one. |
| myid_1998 | M Y I D underscore one nine nine eight | ||
| AiTest | A I T E S T |
- Chinese
- English
| Format | Examples | Chinese output | Description |
|---|---|---|---|
| string | ISBN 1-001-099098-1 | I S B N one dash zero zero one dash zero nine nine zero nine eight dash one | Supports Chinese characters, uppercase and lowercase English letters, Arabic numerals 0~9, and some full-width and half-width characters. The spaces in the output indicate a pause inserted between each character, that is, the characters are read one by one. If the text within the tag contains special XML characters, they must be escaped. |
| x10b2345_u | x one zero b two three four five underscore u | ||
| v1.0.1 | v one point zero point one | ||
| Version number 2.0 | Version number two point zero | ||
| Su M MA000 | Su M M A zero zero zero | ||
| Airbus A330 | Airbus A three three zero | ||
| Model s01 s02 and s03 | Model s zero one s zero two and s zero three | ||
| Airbus A330 | Airbus A three three zero | ||
| αβγ | alpha beta gamma |
- Chinese
- English
| Format | Examples | Chinese output | Description |
|---|---|---|---|
| Punctuation | … | ellipsis | Supports common Chinese and English punctuation. The spaces in the output indicate a pause inserted between each character, that is, the characters are read one by one. If the text within the tag contains special XML characters, they must be escaped. |
| …… | ellipsis | ||
| !"#$%& | exclamation mark double quote hash dollar percent and | ||
| ‘()*+ | single quote left parenthesis right parenthesis asterisk plus | ||
| ,-./:; | comma dash dot slash colon semicolon | ||
| <=>?@ | less than equal sign greater than question mark at | ||
| [\]^_ | Left bracket backslash right bracket caret underscore |
- Chinese
- English
| Format | Examples | Chinese output | Description |
|---|---|---|---|
| year xx | year 71 | year 71 (in Chinese numerals) | 2-digit and 4-digit years are supported. Among them: 2-digit years support 60~99, 00~09, and 10~19. 4-digit years support 1000~1999 and 2000~2099. |
| year 04 | year 04 (in Chinese numerals) | ||
| year 19 | year 19 (in Chinese numerals) | ||
| year 1011 | year 1011 (in Chinese numerals) | ||
| year 1998 | year 1998 (in Chinese numerals) | ||
| year 2008 | year 2008 (in Chinese numerals) | ||
| year xx, month xx | year 98, month 4 | year 98, month 4 (in Chinese numerals) | When the month is 1 to 9, both notations with and without a leading "0" are supported. For example, "year 1908, month 4" and "year 1908, month 04". |
| year 1998, month 04 | year 1998, month 4 (in Chinese numerals) | ||
| year 08, month 8 | year 08, month 8 (in Chinese numerals) | ||
| year 2008, month 8 | year 2008, month 8 (in Chinese numerals) | ||
| year xx, month xx, day xx; year xx, month xx, day xx (alternative day notation) | year 98, month 4, day 23 | year 98, month 4, day 23 (in Chinese numerals) | When the day is 1 to 9, both notations with and without a leading "0" are supported. For example, "year 1908, month 4, day 8" and "year 1908, month 04, day 08". |
| year 1998, month 04, day 23 | April 23, 1998 | ||
| August 8, '08 | August 8, '08 | ||
| August 8, 2008 | August 8, 2008 | ||
| year xx, month xx, day xx; year xx, month xx, day xx (alternative day notation) | year 98, month 4, day 23 | year 98, month 4, day 23 (in Chinese numerals) | When the date is between the 1st and the 9th of the month, both spellings with and without a leading "0" are supported, for example "April 8, 1908" and "April 08, 1908". |
| year 1998, month 04, day 23 | April 23, 1998 | ||
| August 8, '08 | August 8, '08 | ||
| August 8, 2008 | August 8, 2008 | ||
| MM/DD | March 20 | March 20 | None |
| August 7 | August 7 | ||
| Year and month abbreviation | 2018/08 | August 2018 | "/", "-", and "." are supported as separators for abbreviations. |
| 2018-08 | August 2018 | ||
| 2018.08 | August 2018 | ||
| Year, month, and day abbreviation | 2018/08/08 | August 8, 2018 | |
| 2018-8-8 | August 8, 2018 | ||
| 2018.08.08 | August 8, 2018 | ||
| MM/DD/YYYY~MM/DD/YYYY MM/DD/YYYY~MM/DD/YYYY | September 1~30, '04 | September 1 to 30, '04 | "~" and "-" are supported as abbreviation markers for "to". |
| September 1, 2004 - June 8, 2008 | September 1, 2004 to June 8, 2008 | ||
| MM/DD/YYYY~DD MM/DD/YYYY~DD | September 1~30, '04 | September 1 to 30, '04 | |
| September 1, 2004 - June 8, 2008 | September 1, 2004 to June 8, 2008 | ||
| MM/YYYY~MM/YYYY | April '01~April '10 | April '01 to April '10 | |
| April 2001~April 2010 | April 2001 to April 2010 | ||
| MM/DD~MM/DD MM/DD~MM/DD | October 1~October 7 | October 1 to October 7 | |
| October 01~October 07 | October 1~October 7 | ||
| xx month xx day~xx day; xx month xx day~xx day | October 1~7 | October 1 to 7 | |
| October 01~07 | October 1st to 7th | ||
| Year-month-day abbreviation~year-month-day abbreviation | 2018/03/03~2019/01/01 | March 3, 2018 to January 1, 2019 | Supports "/" and "." as separators for abbreviations, and supports "~" and "-" as abbreviated markers for "to". |
| 1997.9.9~1998.9.9 | September 9, 1997 to September 9, 1998 | ||
| Month-day abbreviation~month-day abbreviation | 10/20~10/31 | October 20 to October 31 | |
| xx~xx month; xx month~xx month | 1~10 month | January to October | |
| January~October | January to October | ||
| Month-day-year abbreviation | 10/20/2018 | October 20, 2018 | Only 4-digit years are supported, only "/" is supported as the date separator, and only the month/day/year writing format is supported. |
- Chinese
- English
| Format | Examples | Chinese output | Description |
|---|---|---|---|
| Time of day | 12:00 | Twelve o'clock | Supports common time and time range formats. |
| 12:00:00 o'clock | Twelve o'clock | ||
| 10:20 | Ten twenty | ||
| 10:20:30 | Ten twenty and thirty seconds | ||
| 09:18:14 | Nine eighteen and fourteen seconds | ||
| Time of day~Time of day | 11:00~12:00 | Eleven o'clock to twelve o'clock | |
| 09:00-14:00 | Nine o'clock to fourteen o'clock | ||
| 11:00~11:30 | Eleven o'clock to eleven thirty | ||
| 11:00-12:18 | Eleven o'clock to twelve eighteen | ||
| 10:30~11:00 | Ten thirty to eleven o'clock | ||
| 09:28-10:00 | Nine twenty-eight to ten o'clock | ||
| 10:20~11:20 | Ten twenty to eleven twenty | ||
| 06:00~08:00 | Six o'clock to eight o'clock | ||
| 10:20 a.m.~13:30 p.m. | Ten twenty a.m. to thirteen thirty p.m. | ||
| Time abbreviations | 5:00 am | Five o'clock sharp in the early morning | |
| 5:30 am | Half past five in the early morning | ||
| 5:20:12 am | Five twenty and twelve seconds in the early morning | ||
| 7:00 am | Seven o'clock sharp in the morning | ||
| 7:30 AM | 7:30 AM | ||
| 7:20:12 a.m. | 7:20:12 AM | ||
| 07:08:12 A.M. | 7:08:12 AM | ||
| 5:00 pm | 5:00 PM | ||
| 5:30 PM | 5:30 PM | ||
| 5:20:12 p.m. | 5:20:12 PM | ||
| 05:09:12 P.M. | 5:09:12 PM | ||
| 9:00 pm | 9:00 PM | ||
| 9:30 pm | 9:30 PM | ||
| 9:20:12 PM | 9:20:12 PM | ||
| 9:02:12 P.M. | 9:02:12 PM | ||
| 12:00 pm | 12:00 PM | ||
| 12:30 p.m. | 12:30 PM | ||
| 12:20:12 PM | 12:20:12 PM |
- Chinese
- English
| Format | Examples | Chinese output | Description |
|---|---|---|---|
| Number + currency identifier | 12.00 RMB | 12 RMB | Supported currencies include AUD (Australian dollar), CAD (Canadian dollar), HKD (Hong Kong dollar), JPY (Japanese yen), USD (US dollar), CHF (Swiss franc), NOK (Norwegian krone), SEK (Swedish krona), GBP (British pound), RMB (renminbi), CNY (yuan), and EUR (euro). Supported number formats include: integers, decimals, and international notation separated by commas. |
| 12.50 RMB | 12.50 RMB | ||
| 12,000,000 RMB | 12,000,000 RMB | ||
| 12,000,000.00 RMB | 12,000,000 RMB | ||
| 12,000.35 RMB | 12,000.35 RMB | ||
| Currency identifier + number | $12 | 12 USD | Supported: CAD (Canadian dollar), $ (US dollar), Fr (franc), kr (Danish krone), £ (British pound), ¥ (yuan), and € (euro). Supported number formats include: integers, decimals, and international notation separated by commas. |
| $12.00 | 12 USD | ||
| $12.12 | 2.12 USD | ||
| $12,000 | 12,000 USD | ||
| $12,000.00 | 12,000 USD | ||
| $12,000.99 | 12,000.99 USD | ||
| Other default readings | 1213 | one thousand two hundred and thirteen | None |
| 1213 KML | one thousand two hundred and thirteen K M L | ||
| 1213.00 KML | one thousand two hundred and thirteen K M L | ||
| 1213.9 KML | one thousand two hundred and thirteen point nine K M L | ||
| 1,000 KML | one thousand K M L | ||
| 1,000.00 KML | one thousand K M L | ||
| 1,000.98 KML | one thousand point nine eight K M L | ||
| 12,000 | twelve thousand |
- Chinese
- English
| Format | Examples | Chinese output | Description |
|---|---|---|---|
| Number + Chinese unit | 2 pieces | two pieces | Common Chinese units and unit abbreviations are supported. |
| 120 hectares | one hundred and twenty hectares | ||
| more than 100 milligrams | more than one hundred milligrams | ||
| approximately 100 meters | approximately one hundred meters | ||
| over 100 people | over one hundred people | ||
| 1 centimeter 20 millimeters | one centimeter twenty millimeters | ||
| 120.00 square kilometers | one hundred and twenty square kilometers | ||
| Number + unit abbreviation | 120.56 cm² | one hundred twenty point five six square centimeters | |
| 120 ㎡ 56 cm² | one hundred twenty square meters fifty-six square centimeters | ||
| 100 m 12 cm 6 mm | one hundred meters twelve centimeters six millimeters | ||
| Range | 10~15 kg | ten to fifteen kilograms | |
| 10.24~789.82 mu | ten point two four to seven hundred eighty-nine point eight two mu | ||
| 10 m~15 m | ten meters to fifteen meters | ||
| 10.24 cm~19.08 cm | ten point two four centimeters to nineteen point zero eight centimeters | ||
| number + unit + "/" + unit | 10 CNY/jin | ten CNY per jin | |
| 199~299 CNY/piece | one hundred ninety-nine to two hundred ninety-nine CNY per piece | ||
| 299.99 CNY/g~399.99 CNY/g | two hundred ninety-nine point nine nine CNY per gram to three hundred ninety-nine point nine nine CNY per gram | ||
| Other default readings | 12 bundles | twelve bundles | |
| 30 rm | thirty r m | ||
| four hundred million compatriots | four hundred million compatriots | ||
| 12.897 micrograms | twelve point eight nine seven micrograms |
| Symbol | Chinese reading | English pronunciation |
|---|---|---|
| ! | Exclamation mark | exclamation mark |
| “ | Double quote | double quote |
| # | Hash sign | pound |
| $ | dollar | dollar |
| % | Percent sign | percent |
| & | and | and |
| ‘ | Single quote | left quote |
| ( | Left parenthesis | left parenthesis |
| ) | Right parenthesis | right parenthesis |
| * | Asterisk | asterisk |
| + | Plus sign | plus |
| , | Comma | comma |
| - | Hyphen | dash |
| . | Point | dot |
| / | Slash | slash |
| : | Zero colon | solon |
| ; | Semicolon | semicolon |
| < | Less than | less than |
| = | Equals sign | equals |
| > | Greater than | greater than |
| ? | Question mark | question mark |
| @ | at | at |
| [ | Left square bracket | left bracket |
| \ | Backslash | back slash |
| ] | Right square bracket | right bracket |
| ^ | Caret | caret |
| _ | Underscore | underscore |
| ` | Backtick | back quote |
| { | Left curly brace | left brace |
| | | VERTICAL LINE | vertical bar |
| } | Right curly brace | right brace |
| ~ | Tilde | tilde |
| ! | Exclamation mark | exclamation mark |
| “ | Left double quotation mark | left double quote |
| ” | Right double quotation mark | right double qute |
| ‘ | Left single quotation mark | left quote |
| ’ | Right single quotation mark | right quote |
| ( | Left parenthesis | left parenthesis |
| ) | Right parenthesis | right parenthesis |
| , | Comma | comma |
| 。 | Period | full stop |
| — | Hyphen | em dash |
| : | Colon | colon |
| ; | Semicolon | semicolon |
| ? | Question mark | question mark |
| 、 | Enumeration comma | enumeration comma |
| … | ellipsis | ellipsis |
| …… | ellipsis | ellipsis |
| 《 | Left title mark | left guillemet |
| 》 | Right title mark | right guillemet |
| ¥ | RMB sign | yuan |
| ≥ | Greater than or equal to | greater than or equal to |
| ≤ | Less than or equal to | less than or equal to |
| ≠ | Not equal to | not equal |
| ≈ | Approximately equal to | approximately equal |
| ± | Plus-minus | plus or minus |
| × | Multiplication sign | times |
| π | Pi | pi |
| Α | Alpha | alpha |
| Β | Beta | beta |
| Γ | Gamma | gamma |
| Δ | Delta | delta |
| Ε | Epsilon | epsilon |
| Ζ | Zeta | zeta |
| Θ | Theta | theta |
| Ι | Iota | iota |
| Κ | Kappa | kappa |
| ∧ | Lambda | lambda |
| Μ | Mu | mu |
| Ν | Nu | nu |
| Ξ | Xi | ksi |
| Ο | Omicron | omicron |
| ∏ | Pi | pi |
| Ρ | Rho | rho |
| ∑ | Sigma | sigma |
| Τ | Tau | tau |
| Υ | Upsilon | upsilon |
| Φ | fai | phi |
| Χ | Chi | chi |
| Ψ | Psi | psi |
| Ω | Omega | omega |
| α | Alpha | alpha |
| β | Beta | beta |
| γ | Gamma | gamma |
| δ | Delta | delta |
| ε | Epsilon | epsilon |
| ζ | Zeta | zeta |
| η | Eta | eta |
| θ | Theta | theta |
| ι | Iota | iota |
| κ | Kappa | kappa |
| λ | Lambda | lambda |
| μ | Mu | mu |
| ν | Nu | nu |
| ξ | Xi | ksi |
| ο | Omicron | omicron |
| π | Pi | pi |
| ρ | Rho | rho |
| σ | Sigma | sigma |
| τ | Tau | tau |
| υ | Upsilon | upsilon |
| φ | fai | phi |
| χ | Chi | chi |
| ψ | Psi | psi |
| ω | Omega | omega |
| Format | Category | Chinese example | English example |
|---|---|---|---|
| Abbreviation | Length | nm (nanometer), μm (micrometer), mm (millimeter), cm (centimeter), m (meter), km (kilometer), ft (foot), in (inch) | nm (nanometre), μm (micrometre), mm (millimetre), cm (centimetre), m (metre), km (kilometre), ft (foot), in (inch) |
| Area | cm² (square centimeter), ㎡ (square meter), km² (square kilometer), SqFt (square foot) | cm² (square centimetre), ㎡ (square metre), km2 (square kilometre), SqFt (square foot) | |
| Volume | cm³ (cubic centimeter), m³ (cubic meter), km³ (cubic kilometer), mL (milliliter), L (liter), gallon (gallon) | cm³ (cubic centimetre), m³ (cubic metre), km3 (cubic kilometre), mL (millilitre), L (millilitre), gal (gallon) | |
| Weight | μg (microgram), mg (milligram), g (gram), kg (kilogram) | μg (microgram), mg (microgram), g (gram), kg (kilogram) | |
| Time | min (minute), sec (second), ms (millisecond) | min (minute), sec (second), ms (millisecond) | |
| Electromagnetism | μA (microampere), mA (milliampere), Ω (ohm), Hz (hertz), kHz (kilohertz), MHz (megahertz), GHz (gigahertz), V (volt), kV (kilovolt), kWh (kilowatt-hour) | μA (microamp), mA (milliamp), Hz (hertz), kHz (kilohertz), MHz (megahertz), GHz (gigahertz), V (volt), kV (kilovolt), kWh (kilowatt hour) | |
| Sound | dB (decibel) | dB (decibel) | |
| Air pressure | Pa (pascal), kPa (kilopascal), Mpa (megapascal) | Pa (pascal), kPa (kilopascal), MPa (megapascal) | |
| Other common units | In addition to the categories listed above, Chinese units such as mi (meter), miao (second), meiyuan (US dollar), and haoshengmeiping (milliliter per bottle) are supported, as well as Chinese measure words such as jia (for aircraft), chang (for shows), tou (for animals), bu (for devices), and pen (for potted plants). | Units of measurement beyond the above categories are also supported, such as tsp (teaspoon), rpm (round per minute), KB (kilobyte), and mmHg (milimetre of mercury). | |
LaTeX tags and symbols
View the supported tags and symbols by category. The formula input examples include delimiters; the reading column provides examples in Chinese.
Basic math
| Tag or symbol | Meaning | Formula content example | Formula input example | Example reading |
|---|---|---|---|---|
+ | Plus sign | 2 + 3 = 5 | $2 + 3 = 5$ | Two plus three equals five |
- | Minus | 3 - 2 = 1 | $3 - 2 = 1$ | Three minus two equals one |
\pm | Plus-minus | \pm 1 \pm 2 | $\pm 1\pm 2$ | Plus or minus one, plus or minus two |
| Plus or minus | ||||
\times | Multiplication sign | 2 \times 3 = 6 | $2 \times 3 = 6$ | Two times three equals six |
× | 2 × 3 = 6 | $$2 × 3 = 6$$ | ||
* | 2 * 3 = 6 | \(2 * 3 = 6\) | ||
\div | Divided by | 6\div2=3 | \[6\div2=3\] | Six divided by two equals three |
÷ | 6÷2=3 | $6÷2=3$ | ||
/ | 6/2=3 | $6/2=3$ | ||
= | Equals | 3+5=8 | $3+5=8$ | Three plus five equals eight |
< | Less than | 1< 2 | $1< 2$ | One is less than two |
≤ | Less than or equal to | 3≤5 | $3≤5$ | Three is less than or equal to five |
<= | 3<=5 | $3<=5$ | ||
\leq | 3\leq5 | $3\leq 5$ | ||
\le | 3\le5 | $3\le 5$ | ||
\leqq | 3\leqq5 | $3\leqq 5$ | ||
\leqslant | 3\leqslant5 | $3\leqslant 5$ | ||
> | Greater than | 2>1 | $2>1$ | Two is greater than one |
≥ | Greater than or equal to | 5≥3 | $5≥3$ | Five is greater than or equal to three |
>= | 5>=3 | $5>=3$ | ||
\geq | 5\geq3 | $5\geq 3$ | ||
\ge | 5\ge3 | $5\ge 3$ | ||
\geqq | 5\geqq3 | $5\geqq 3$ | ||
\geqslant | 5\geqslant3 | $5\geqslant 3$ | ||
\frac | Fraction | 2\frac3 | $\frac {2}{3}$ | Two thirds |
^ | Power | 2^1 | $2^{1}$ | Two to the first power |
\sqrt | Square root | \sqrt{9} = 3 | $\sqrt {9} = 3$ | The square root of nine equals three |
\sqrt[3]{8} = 2 | $\sqrt[3]{8} = 2$ | The cube root of eight equals two | ||
\% | Percentage | 5\% | $5\%$ | Five percent |
| | Absolute value | ∣3∣=3 | $|3| =3$ | The absolute value of three equals three |
\vert | 3\vert=3 | $\vert 3\vert =3$ | The absolute value of three, absolute value, equals three | |
\lg | Logarithm | lg {10} | $\lg {10}$ | log ten |
\log | Logarithm | \log{5} | $\log{5}$ | log five |
\ln | Natural logarithm | \lnX | $ln {10}$ | LN ten |
! | Factorial | 5! | $5!$ | The factorial of five |
() | Parentheses | (2+1) | $(2+1)$ | Two plus one inside the parentheses |
\{ \} | $\{2+1\}$ | Left curly brace, two plus one, right curly brace |
Special mathematical symbols
| Tag or symbol | Meaning | Formula content example | Formula input example | Example reading |
|---|---|---|---|---|
\alpha | alpha | \alpha | $\alpha$ | α |
\Alpha | \Alpha | $\Alpha$ | ||
\beta | beta | \beta | $\beta$ | β |
\Beta | \Beta | $\Beta$ | ||
\gamma | gamma | \gamma | $\gamma$ | γ |
\Gamma | \Gamma | $\Gamma$ | ||
\delta | delta | \delta | $\delta$ | Δ |
\Delta | \Delta | $\Delta$ | ||
\infty | Infinity (Chinese) | \infty | $\infty$ | Infinity |
∞ | infty (English) | ∞ | $∞$ |
Geometry
| Tag or symbol | Meaning | Formula content example | Formula input example | Example reading |
|---|---|---|---|---|
\pi | Pi | \pi=3.14159 | $\pi =3.14159$ | Pi equals three point one four one five nine |
\sin (sine) | Trigonometric functions | \sin 30^\circ =\frac {1}{2} | $\sin 30^\circ =\frac {1}{2}$ | The sine of thirty degrees equals one half |
\cos (cosine) | \cos 45^\circ =\frac {\sqrt {2}}{2} | $\cos 45^\circ =\frac {\sqrt {2}}{2}$ | The cosine of forty-five degrees equals the square root of two over two | |
\tan (tangent) | \tan 30^\circ =\frac {\sin 30^\circ}{\cos 30^\circ} | $\tan 30^\circ =\frac {\sin 30^\circ}{\cos 30^\circ}$ | The tangent of thirty degrees equals the sine of thirty degrees over the cosine of thirty degrees | |
\csc (cosecant) | \csc A | $\csc A$ | cosecant A | |
\sec (secant) | \sec A | $\sec A$ | secant A | |
\cot (cotangent) | \cot A | $\cot A$ | cotangent A | |
\angle | Angle | \angle AB | $\angle AB$ | Angle A B |
∠ | ∠AB | $∠AB$ | ||
^\circ | Degree | ∠AB = 30^\circ | $∠AB = 30^\circ$ | Angle A B equals thirty degrees |
\odot | Circle | \odot | $\odot$ | Circle |
\overset\frown | Arc | \overset\frown {BC} | $\overset\frown {BC}$ | Arc BC |
\rm{Rt} | Right angle | \because \rm{Rt}\triangle ABC | $\because \rm{Rt}\triangle ABC$ | Because right triangle ABC |
\mathrm{Rt} | \therefore AB \perp BC | $\therefore AB \perp BC$ | Therefore AB is perpendicular to BC | |
\triangle | Triangle | \triangleABC | $\triangle ABC$ | Triangle ABC |
△ | △ABC | $△ABC$ | ||
\parallelogram | Parallelogram | \parallelogramABCD | $\parallelogram ABCD$ | Parallelogram ABCD |
\perp | Perpendicular | AB \perp BC | $AB \perp BC$ | A B is perpendicular to B C |
\bot | AB \bot BC | $AB \bot BC$ | ||
⊥ | AB ⊥ BC | $AB ⊥ BC$ | ||
\parallel | Parallel | A\parallel B | $A\parallel B$ | A is parallel to B |
\equalparallel | Parallel and equal to | A\equalparallel B | $A\equalparallel B$ | A is parallel and equal to B |
\cong | Congruent | △ABC\cong△DEF | $△ABC\cong△DEF$ | Triangle ABC is congruent to triangle DEF |
Conditions
| Tag or symbol | Meaning | Formula content example | Formula input example | Example reading |
|---|---|---|---|---|
\implies | Implies | \implies 1+1=2 | $\implies 1+1=2$ | Implies that one plus one equals two |
\iff | Equivalent | p\iffq | $p\iffq$ | p is equivalent to q |
\because | Because | \because a = b \therefore b=a | $\because a = b \therefore b=a$ | Because a equals b, so b equals a |
\therefore | Therefore |
Units
Units must be wrapped in \unit, \quantity, \mathit, \mathrm, or \rm, for example \unit{cm}.
| Tag or symbol | Meaning | Formula content example | Formula input example | Example reading |
|---|---|---|---|---|
mm | millimeter | 5\quantity{mm} | $5\quantity{mm}$ | five millimeters |
cm | centimeter | 5\quantity{cm} | $5\quantity{cm}$ | five centimeters |
dm | decimeter | 5\quantity{dm} | $5\quantity{dm}$ | five decimeters |
m | meter | 5\quantity{m} | $5\quantity{m}$ | five meters |
km | kilometer | 5\quantity{km} | $5\quantity{km}$ | five kilometers |
g | gram | 5\quantity{g} | $5\quantity{g}$ | five grams |
kg | kilogram | 5\quantity{kg} | $5\quantity{kg}$ | five kilograms |
t | ton | 5\quantity{t} | $5\quantity{t}$ | five tons |
mm^2 | square millimeter | 5\quantity{mm^2} | $5\quantity{mm^2}$ | five square millimeters |
cm^2 | square centimeter | 5\quantity{cm^2} | $5\quantity{cm^2}$ | five square centimeters |
dm^2 | square decimeter | 5\quantity{dm^2} | $5\quantity{dm^2}$ | five square decimeters |
m^2 | square meter | 5\quantity{m^2} | $5\quantity{m^2}$ | five square meters |
km^2 | square kilometer | 5\quantity{km^2} | $5\quantity{km^2}$ | five square kilometers |
mm^3 | cubic millimeter | 5\quantity{mm^3} | $5\quantity{mm^3}$ | five cubic millimeters |
cm^3 | cubic centimeter | 5\quantity{cm^3} | $5\quantity{cm^3}$ | five cubic centimeters |
dm^3 | cubic decimeter | 5\quantity{dm^3} | $5\quantity{dm^3}$ | five cubic decimeters |
m^3 | cubic meter | 5\quantity{m^3} | $5\quantity{m^3}$ | five cubic meters |
km^3 | cubic kilometer | 5\quantity{km^3} | $5\quantity{km^3}$ | five cubic kilometers |
ml | milliliter | 5\quantity{ml} | $5\quantity{ml}$ | five milliliters |
s | second | 5\quantity{s} | $5\quantity{s}$ | five seconds |
min | minute | 5\quantity{min} | $5\quantity{min}$ | five minutes |
h | hour | 5\quantity{h} | $5\quantity{h}$ | five hours |
km/h | kilometers per hour | 5\quantity{km/h} | $5\quantity{km/h}$ | five kilometers per hour |
g/l | grams per liter | 5\quantity{g/l} | $5\quantity{g/l}$ | five grams per liter |
FAQ
What should I do if formulas are not read aloud correctly?
- Check whether the formula is wrapped in
$...$,$$...$$,\(...\), or\[...\]. - Check whether the formula contains unsupported tags or symbols.
- Check whether the
\in the request string is correctly escaped as\\.
How do I handle backslashes in code?
For escaping instructions, see Usage. Formulas are written differently from code strings. For example, \frac should be written as \\frac in a regular string.