Skip to main content
Speech synthesis

SSML

Use SSML (Speech Synthesis Markup Language) to fine-tune speech characteristics such as speed, pauses, and pronunciation.

Overview

SSML (Speech Synthesis Markup Language) is an XML-based markup language for speech synthesis. Embed SSML tags in your text to control speech rate, intonation, pauses, and volume, or to add background music and sound effects for richer audio output. Typical use cases include:
  • Audiobooks: control pauses and speech rate with precision, and add background music for an immersive listening experience
  • Intelligent customer service: use the <say-as> tag to ensure accurate reading of phone numbers, dates, and similar information
  • Multilingual broadcasting: use the <phoneme> tag to specify precise pronunciations for foreign words
  • Online education: convert LaTeX formulas into natural speech with the formula reading feature
Both features are available for the CosyVoice model family. For model selection guidance, see Speech synthesis.

SSML

Limitations

  • Models: SSML is supported only by 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, and cosyvoice-v2.
  • Voices: Only cloned voices and preset voices marked as SSML-compatible in CosyVoice Voice list are supported.
  • APIs: SSML is supported through the following APIs:
    • Java SDK (version 2.20.3 or later): non-streaming and unidirectional streaming calls
    • Python SDK (version 1.23.4 or later): non-streaming and unidirectional streaming calls
    • WebSocket API: set the enable_ssml parameter to true, and send a single continue-task event

Quick start

The example below uses SSML to control speech rate during synthesis. Before running the code, complete these prerequisites:
  1. Obtain an API key
  2. Install the DashScope SDK (Python 1.23.4 or later, Java 2.20.3 or later). For details, see Install the SDK.
The cosyvoice-v3.5-plus and cosyvoice-v3.5-flash models are currently available only in the Beijing region and are designed exclusively for voice cloning scenarios (no preset voices are provided). Before using these models, create a target voice by following the instructions in Voice cloning.
  • Java SDK
  • Python SDK
  • WebSocket API
import com.alibaba.dashscope.audio.ttsv2.SpeechSynthesisParam;
import com.alibaba.dashscope.audio.ttsv2.SpeechSynthesizer;
import com.alibaba.dashscope.utils.Constants;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;

/**
 * SSML feature description:
 *     1. Only non-streaming calls and unidirectional streaming calls support the SSML feature
 *     2. Only cloned voices of the qwen-audio-3.0-tts-flash, qwen-audio-3.0-tts-plus, cosyvoice-v3-flash, cosyvoice-v3-plus, and cosyvoice-v2 models, as well as system voices marked as SSML-supported in the voice list, support the SSML feature (for example, the longanyang voice of the cosyvoice-v3-flash model)
 */
public class Main {
    private static String model = "cosyvoice-v3-flash";
    private static String voice = "longanyang";

    public static void main(String[] args) {
        // Singapore region URL. Replace WorkspaceId with your actual workspace ID. The URL varies by region.
        Constants.baseWebsocketApiUrl = "wss://{WorkspaceId}.ap-southeast-1.maas.aliyuncs.com/api-ws/v1/inference";
        streamAudioDataToSpeaker();
        System.exit(0);
    }

    public static void streamAudioDataToSpeaker() {
        SpeechSynthesisParam param =
                SpeechSynthesisParam.builder()
                        // The API Keys for the Singapore and Beijing regions are different. Get an API Key: https://www.alibabacloud.com/help/en/model-studio/get-api-key
                        // If you have not configured an environment variable, replace the following line with your Model Studio API Key: .apiKey("sk-xxx")
                        .apiKey(System.getenv("DASHSCOPE_API_KEY"))
                        .model(model)
                        .voice(voice)
                        .build();

        SpeechSynthesizer synthesizer = new SpeechSynthesizer(param, null);
        ByteBuffer audio = null;
        try {
            // Non-streaming call, blocks until audio is returned
            // Special characters need to be escaped
            audio = synthesizer.call("<speak rate=\"2\">My speaking rate is faster than a normal person's.</speak>");
        } catch (Exception e) {
            throw new RuntimeException(e);
        } finally {
            // Close the WebSocket connection when the task ends
            synthesizer.getDuplexApi().close(1000, "bye");
        }
        if (audio != null) {
            // Save audio data to local file "output.mp3"
            File file = new File("output.mp3");
            try (FileOutputStream fos = new FileOutputStream(file)) {
                fos.write(audio.array());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }

        // The first text transmission requires establishing a WebSocket connection, so the first packet latency includes the connection setup time
        System.out.println(
                "[Metric] requestId: "
                        + synthesizer.getLastRequestId()
                        + ", first packet latency (ms): "
                        + synthesizer.getFirstPackageDelay());
    }
}

Tag reference

The Alibaba Cloud SSML implementation is based on the W3C SSML 1.0 specification. Not all standard tags are supported; the service implements the most commonly used tags for production scenarios.
  • When using SSML, all text content must be enclosed within <speak></speak> tags.
  • Multiple <speak> tags can be used in sequence (for example, <speak></speak><speak></speak>), but nesting is not supported (for example, <speak><speak></speak></speak>).
  • If text inside a tag contains XML special characters, escape them as follows:
    • " (double quote) → &quot;
    • ' (single quote/apostrophe) → &apos;
    • & (ampersand) → &amp;
    • < (less-than sign) → &lt;
    • > (greater-than sign) → &gt;

<speak>: root element

  • Description <speak> is the root element for all SSML content. All text must be enclosed within <speak></speak> tags.
  • Syntax
     <speak>Text that requires SSML processing</speak>
    
  • Attributes
    AttributeTypeRequiredDescription
    voiceStringNoSpecifies the voice.This attribute takes precedence over the voice parameter in the API request.
    • Valid values: a specific voice name. For details, see cosyvoice-v2 voices.
    • Example:
      <speak voice="longcheng_v2">
        I am a male voice.
      </speak>
      
    rateStringNoSpecifies the speech rate. This attribute takes precedence over the speech_rate parameter in the API request.
    • Valid values: a decimal number between 0.5 and 2 (inclusive)
    • Default value: 1
      • Values greater than 1 increase the speech rate
      • Values less than 1 decrease the speech rate
    • Example:
      <speak rate="2">
        My speech rate is faster than normal.
      </speak>
      
    pitchStringNoSpecifies the pitch. This attribute takes precedence over the pitch_rate parameter in the API request.
    • Valid values: a decimal number between 0.5 and 2 (inclusive)
    • Default value: 1
      • Values greater than 1 raise the pitch
      • Values less than 1 lower the pitch
    • Example:
      <speak pitch="0.5">
        However, my pitch is lower than others.
      </speak>
      
    volumeStringNoSpecifies the volume. This attribute takes precedence over the volume parameter in the API request.
    • Valid values: an integer between 0 and 100 (inclusive)
    • Default value: 50
      • Values greater than 50 increase the volume
      • Values less than 50 decrease the volume
    • Example:
      <speak volume="80">
        My volume is also very high.
      </speak>
      
    effectStringNoSpecifies the audio effect.
    • Valid values:
      • robot: robot voice effect
      • lolita: lolita voice effect
      • lowpass: low-pass filter effect
      • echo: echo effect
      • eq: equalizer (advanced)
      • lpfilter: low-pass filter (advanced)
      • hpfilter: high-pass filter (advanced)
      • eq, lpfilter, and hpfilter are advanced effect types. Use the effectValue parameter to customize specific effects.
      • Each SSML tag supports only one effect. Setting multiple effect attributes simultaneously isn't allowed.
      • Enabling audio effects increases synthesis latency.
    • Example:
      <speak effect="robot">
        Do you like the robot WALL-E?
      </speak>
      
    effectValueStringNoConfigures the specific behavior of the audio effect (the effect parameter). Applies to three advanced effect types: eq, lpfilter, and hpfilter.
    • Valid values:
      • eq (equalizer): the system supports 8 frequency bands by default, corresponding to the following frequencies: ["40 Hz","100 Hz", "200 Hz", "400 Hz", "800 Hz", "1600 Hz", "4000 Hz", "12000 Hz"]. Each band has a bandwidth of 1.0q. Use the effectValue parameter to specify the gain for each band. The parameter is a string of 8 integers ranging from -20 to 20, separated by spaces. A value of 0 means no gain adjustment for that frequency. Example: effectValue="1 1 1 1 1 1 1 1"
      • lpfilter (low-pass filter): specifies the cutoff frequency. Valid values: an integer in the range (0, target_sample_rate/2]. Example: effectValue="800".
      • hpfilter (high-pass filter): specifies the cutoff frequency. Valid values: an integer in the range (0, target_sample_rate/2]. Example: effectValue="1200".
    • Example:
      <speak effect="eq" effectValue="1 -20 1 1 1 1 20 1">
        Do you like the robot WALL-E?
      </speak>
      
      <speak effect="lpfilter" effectValue="1200">
        Do you like the robot WALL-E?
      </speak>
      
      <speak effect="hpfilter" effectValue="1200">
        Do you like the robot WALL-E?
      </speak>
      
    bgmStringNoAdds background music to the synthesized speech. The audio file must be stored on Alibaba Cloud OSS (see Upload objects), and the bucket must have at least public-read access.If the background music URL contains XML special characters (such as &, <, >), escape them.
    • Audio requirements: There's no upper limit on the background music file size, but larger files take longer to download. If the synthesized speech is longer than the background music, the music loops automatically.
      • Sample rate: 16 kHz
      • Channels: mono
      • Format: WAV To convert a non-WAV file, use ffmpeg:
        ffmpeg -i input_audio -acodec pcm_s16le -ac 1 -ar 16000 output.wav
        
      • Bit depth: 16-bit
    • Example:
      <speak bgm="http://nls.alicdn.com/bgm/2.wav" backgroundMusicVolume="30" rate="-500" volume="40">
        <break time="2s"/>
        The old trees on the shady cliff are shrouded in mist
        <break time="700ms"/>
        The sound of rain is still in the bamboo forest
        <break time="700ms"/>
        I know that cotton contributes to the country's plan
        <break time="700ms"/>
        The scenery of Mianzhou is always pitiable
        <break time="2s"/>
      </speak>
      
    You're responsible for the copyright of any uploaded audio.
    backgroundMusicVolumeStringNoSpecifies the background music volume. Use this attribute together with the bgm attribute.
  • Tag relationships The <speak> tag can contain text and the following child tags:
  • More examples
    • No attributes
      <speak>
        Text that requires SSML tags
      </speak>
      
    • Combined attributes (space-separated)
      <speak rate="200" pitch="-100" volume="80">
        So when put together, my voice sounds like this.
      </speak>
      

<break>: control pause duration

  • Description Inserts a silent pause during speech synthesis to simulate natural pauses in conversation. Supports seconds (s) and milliseconds (ms) as time units.
  • Syntax
    # No attributes
    <break/>
    # With time attribute
    <break time="string"/>
    
  • Attributes
    A <break> tag without attributes pauses for 1 second by default.
    AttributeTypeRequiredDescription
    timeStringNoSpecifies the pause duration, in seconds or milliseconds (for example, "2s" or "50ms").
    • Valid values:
      • In seconds (s): an integer between 1 and 10 (inclusive)
      • In milliseconds (ms): an integer between 50 and 10000 (inclusive)
    • Example:
      <speak>
        Please close your eyes and take a rest.<break time="500ms"/>Okay, please open your eyes.
      </speak>
      
    When multiple <break> tags are used consecutively, the total pause duration is the sum of all individual durations. If the total exceeds 10 seconds, only the first 10 seconds are applied.For example, in the following SSML, the cumulative <break> duration is 15 seconds. Because this exceeds the 10-second limit, the actual pause is truncated to 10 seconds:
    <speak>
      Please close your eyes and take a rest.<break time="5s"/><break time="5s"/><break time="5s"/>Okay, please open your eyes.
    </speak>
    
  • Tag relationships <break> is a self-closing element and cannot contain child elements.

<sub>: substitute text

  • Description Replaces specified text with content that's more suitable for speech. For example, reads "W3C" as "World Wide Web Consortium."
  • Syntax
    <sub alias="string"></sub>
    
  • Attributes
    AttributeTypeRequiredDescription
    aliasStringYesSpecifies the replacement text to be read aloud.Example:
     <speak>
       <sub alias="network protocol">W3C</sub>
     </speak>
    
  • Tag relationships The <sub> tag can contain only plain text.

<phoneme>: specify pronunciation (pinyin/phonetic)

  • Description Provides precise control over how text is pronounced. Chinese text supports pinyin notation, and English text supports CMU phonetic notation. This is useful for disambiguating polyphonic characters and handling foreign language pronunciation.
  • Syntax
    <phoneme alphabet="string" ph="string">Text</phoneme>
    
  • Attributes
    AttributeTypeRequiredDescription
    alphabetStringYesSpecifies the pronunciation type: pinyin (for Chinese) or phonetic symbols (for English).Valid values:
    phStringYesSpecifies the exact pinyin or phonetic notation. Usage rules:
    • Separate pinyin for multiple characters with spaces. The number of pinyin entries must match the number of characters.
    • Each pinyin entry consists of the pronunciation and a tone number. Tone numbers range from 1 to 5, where 5 represents the neutral tone.
    • Example:
      <speak>
        How to spell <phoneme alphabet="cmu" ph="S AY N">sin</phoneme>?
      </speak>
      
  • Tag relationships The <phoneme> tag can contain only plain text.

<soundEvent>: insert an external sound (ringtone, cat meow, etc.)

  • Description Inserts a sound effect file (such as an alert tone or ambient sound) at a specific point in the speech to enrich the audio output.
  • Syntax
     <soundEvent src="URL"/>
    
  • Attributes
    AttributeTypeRequiredDescription
    srcStringYesSpecifies the URL of an external audio file.The audio file must be stored on Alibaba Cloud OSS (see Upload objects), and the bucket must have at least public-read access. If the URL contains XML special characters (such as &, <, >), escape them.
    • Audio requirements:
      • Sample rate: 16 kHz
      • Channels: mono
      • Format: WAV To convert a non-WAV file, use ffmpeg:
        ffmpeg -i input_audio -acodec pcm_s16le -ac 1 -ar 16000 output.wav
        
      • File size: 2 MB maximum
      • Bit depth: 16-bit
    • Example:
      <speak>
        A horse was frightened<soundEvent src="http://nls.alicdn.com/sound-event/horse-neigh.wav"/>and people scattered to avoid it.
      </speak>
      
    You are legally responsible for the copyright of the uploaded audio.
  • Tag relationships <soundEvent> is a self-closing element and cannot contain child elements.

<say-as>: set text interpretation (numbers, dates, phone numbers, etc.)

  • Description Specifies the content type of text (such as numbers, dates, or phone numbers) so the system reads it according to the appropriate rules for that type.
  • Syntax
     <say-as interpret-as="string">Text</say-as>
    
  • Attributes

    Attribute

    Type

    Required

    Description

    interpret-as

    String

    Yes

    Specifies the content type of the text within the tag.

    Valid values:

    • cardinal: reads as a standard integer or decimal number

    • digits: reads each digit individually (for example, 123 is read as "one two three")

    • telephone: reads digit by digit in the standard phone number format

    • name: reads using standard name pronunciation rules

    • address: reads using standard address pronunciation rules

    • id: reads using standard identifier (account name, nickname) pronunciation rules

    • characters: reads each character in the text individually

    • punctuation: reads the name of each punctuation mark

    • date: reads using standard date pronunciation rules

    • time: reads using standard time pronunciation rules

    • currency: reads using standard monetary amount pronunciation rules

    • measure: reads using standard unit of measurement pronunciation rules

  • Supported ranges for each <say-as> type
    • cardinal

      Format

      Example

      English output

      Notes

      Digit string

      145

      one hundred forty five

      Integer range: positive and negative integers up to 13 digits, [-999999999999,999999999999].

      Decimal range: no specific limit on decimal places, but 10 or fewer is recommended.

      Digit string starting with zero

      0145

      one hundred forty five

      Minus sign + digit string

      -145

      minus hundred forty five

      Digit string with comma separating every 3 digits

      60,000

      sixty thousand

      Minus sign + comma-separated digit string

      -208,000

      minus two hundred eight thousand

      Digit string + decimal point + zero

      12.00

      twelve

      Digit string + decimal point + digit string

      12.34

      twelve point three four

      Comma-separated digit string + decimal point + digit string

      1,000.1

      one thousand point one

      Minus sign + digit string + decimal point + digit string

      -12.34

      minus twelve point three four

      Minus sign + comma-separated digit string + decimal point + digit string

      -1,000.1

      minus one thousand point one

      (Comma-separated) digit string + hyphen + (comma-separated) digit string

      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

      Format

      Example

      English output

      Notes

      Digit string

      12034

      one two zero three four

      No specific limit on digit string length, but 20 or fewer digits is recommended.

      When digit strings are grouped by spaces or hyphens, a comma pause is inserted between groups. Up to 5 groups are supported.

      Digit string + space/hyphen + digit string + space/hyphen + digit string + space/hyphen + digit string

      1-23-456 7890

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

    • telephone

      Format

      Example

      English output

      Notes

      Digit string

      12034

      one two oh three four

      No specific limit on digit string length, but 20 or fewer digits is recommended.When digit strings are grouped by spaces or hyphens, a comma pause is inserted between groups. Up to 5 groups are supported.

      Digit string + space/hyphen + digit string + space/hyphen + digit string

      1-23-456 7890

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

      Plus sign + digit string + space/hyphen + digit string

      +43-211-0567

      plus four three, two one, oh five six seven

      Left paren + digit string + right paren + space + digit string + space/hyphen + digit string

      (21) 654-3210

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

    • address This tag isn't supported for English text.
    • id For English text, this tag functions the same as the characters tag.
    • characters

      Format

      Example

      English output

      Notes

      String

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

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

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

      Spaces in the output indicate pauses between characters, meaning each character is read individually.

      If the text inside the tag contains XML special characters, escape them.

    • punctuation For English text, this tag functions the same as the characters tag.
    • date

      Format

      Example

      English output

      Notes

      Four digits/two digits or four digits-two digits

      2000/01

      two thousand, oh one

      Spans across 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

      4-digit year.

      1900

      nineteen hundred

      1905

      nineteen oh five

      2021

      twenty one

      Day - day of week (hyphen)

      or

      Day - day of week

      or

      Day & day of week

      mon-wed

      monday to wednesday

      If the text in the day-of-the-week range tag contains special XML characters, escape the characters.

      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 nineteen to the twentieth of january two thousand

      DD: 2-digit day. MMM: 3-letter month abbreviation or full word. YYYY: 4-digit year starting with 1 or 2.

      01 ~ 10 Jul, 2020

      the first to the tenth of july 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

      feburary the first to the third

      MMM: 3-letter month abbreviation or full word. DD: 2-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: 3-letter month abbreviation or full word.

      jul ~ dec

      july to december

      sep&oct

      september and october

      YYYY-YYYY

      or

      YYYY~YYYY

      1990 - 2000

      nineteen ninety to two thousand

      YYYY: 4-digit year starting with 1 or 2.

      2001~2021

      two thousand one to twenty one

      WWW DD MMM YYYY

      Sun 20 Nov 2011

      sunday the twentieth of november twenty eleven

      WWW is the three-letter abbreviation or full name for a day of the week. DD is a two-digit day. MMM is the three-letter abbreviation or full name for a month. MM is a two-digit month (or the three-letter abbreviation or full name for a month). 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

      Format

      Example

      English output

      Notes

      HH:MM AM or PM

      09:00 AM

      nine A M

      HH: 1 or 2-digit hour. MM: 2-digit minute. AM/PM: 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 oclock

      Time point-Time point

      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 oclock to thirteen hundred

    • currency

      Format

      Example

      English output

      Notes

      Number + currency identifier

      1.00 RMB

      one yuan

      Supported number formats: integers, decimals, and comma-separated international notation.

      Supported currency identifiers:

      CN¥ (yuan)

      CNY (yuan)

      RMB (yuan)

      AUD (australian dollar)

      CAD (canadian dollar)

      CHF (swiss franc)

      DKK (danish krone)

      EUR (euro)

      GBP (british pound)

      HKD (Hong Kong(China) 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 comma-separated international notation.

      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)

      RMB (yuan)

      AUD (australian dollar)

      CAD (canadian dollar)

      CHF (swiss franc)

      DKK (danish krone)

      EUR (euro)

      GBP (british pound)

      HKD (Hong Kong(China) 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 + classifier + currency identifier

      or

      Currency identifier + number+Quantifier

      1.23 Tn RMB

      one point two three trillion yuan

      Supported classifier formats:

      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

      Format

      Example

      English output

      Notes

      Number + unit of measurement

      1.0 kg

      one kilogram

      Supported number formats: integers, decimals, and comma-separated international notation.

      Supports common unit abbreviations.

      1,234.01 km

      one thousand two hundred thirty four point zero one kilometres.

      Unit of measurement

      mm2

      square millimetre

    • The following table shows how common symbols are read with <say-as>.

      Symbol

      English pronunciation

      !

      exclamation mark

      double quote

      #

      pound

      $

      dollar

      %

      percent

      &

      and

      left quote

      left parenthesis

      right parenthesis

      *

      asterisk

      +

      plus

      ,

      comma

      -

      dash

      .

      dot

      /

      slash

      solon

      semicolon

      <

      less than

      =

      equals

      >

      greater than

      ?

      question mark

      @

      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 qute

      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

      Φ

      phi

      Χ

      chi

      Ψ

      psi

      Ω

      omega

      α

      alpha

      β

      beta

      γ

      gamma

      δ

      delta

      ε

      epsilon

      ζ

      zeta

      η

      eta

      θ

      theta

      ι

      iota

      κ

      kappa

      λ

      lambda

      μ

      mu

      ν

      nu

      ξ

      ksi

      ο

      omicron

      π

      pi

      ρ

      rho

      σ

      sigma

      τ

      tau

      υ

      upsilon

      φ

      phi

      χ

      chi

      ψ

      psi

      ω

      omega

    • The following table shows how common units of measurement are read with <say-as>.

      Format

      Category

      English example

      Abbreviation

      Length

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

      Area

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

      Volume

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

      Weight

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

      Time

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

      Electromagnetism

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

      Sound

      dB (decibel)

      Atmospheric pressure

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

      Other common units

      Supports units beyond those listed above, such as tsp (teaspoon), rpm (revolutions per minute), KB (kilobyte), and mmHg (millimetre of mercury).

  • Tag relationships The <say-as> tag can contain text and <vhml/>.
  • Examples
    • cardinal
      <speak>
        <say-as interpret-as="cardinal">12345</say-as>
      </speak>
      
      <speak>
        <say-as interpret-as="cardinal">10234</say-as>
      </speak>
      
    • digits
      <speak>
        <say-as interpret-as="digits">12345</say-as>
      </speak>
      
      <speak>
        <say-as interpret-as="digits">10234</say-as>
      </speak>
      
    • telephone
      <speak>
        <say-as interpret-as="telephone">12345</say-as>
      </speak>
      
      <speak>
        <say-as interpret-as="telephone">10234</say-as>
      </speak>
      
    • name
      <speak>
        Her former name is <say-as interpret-as="name">Zeng Xiaofan</say-as>
      </speak>
      
    • address
      <speak>
        <say-as interpret-as="address">Fulu International, Building 1, Unit 3, Room 304</say-as>
      </speak>
      
    • id
      <speak>
        <say-as interpret-as="id">myid_1998</say-as>
      </speak>
      
    • characters
      <speak>
        <say-as interpret-as="characters">Greek letters αβ</say-as>
      </speak>
      
      <speak>
        <say-as interpret-as="characters">*b+3.c$=α</say-as>
      </speak>
      
    • punctuation
      <speak>
        <say-as interpret-as="punctuation"> -./:;</say-as>
      </speak>
      
    • date
      <speak>
        <say-as interpret-as="date">1000-10-10</say-as>
      </speak>
      
      <speak>
        <say-as interpret-as="date">10-01-2020</say-as>
      </speak>
      
    • time
      <speak>
        <say-as interpret-as="time">5:00am</say-as>
      </speak>
      
      <speak>
        <say-as interpret-as="time">0500</say-as>
      </speak>
      
    • currency
      <speak>
        <say-as interpret-as="currency">13,000,000.00RMB</say-as>
      </speak>
      
      <speak>
        <say-as interpret-as="currency">$1,000.01</say-as>
      </speak>
      
    • measure
      <speak>
        <say-as interpret-as="measure">100m12cm6mm</say-as>
      </speak>
      
      <speak>
        <say-as interpret-as="measure">1,000.01kg</say-as>
      </speak>
      
Token Plan
Model Playground
Statistics and Monitoring
Support