Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
Software Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive
Help Center/ MetaStudio/ API Reference/ Appendix/ SSML Definition of Text Control

SSML Definition of Text Control

Text control on MetaStudio uses Speech Synthesis Markup Language (SSML) to control the behaviors of virtual humans, including actions, emotions, and multi-pronunciation words and pauses of TTS voice synthesis.

For the basic definition of SSML, see Speech Synthesis Markup Language (SSML) Version 1.0. On this basis, MetaStudio extends some fields to control virtual humans.

MetaStudio SSML currently supports the following capabilities:

  • Text pronunciation control during TTS voice synthesis
    The following tags are included:
    • <speak></speak> is the root node of the SSML text.
    • <break/> is used for mute pause. You can set the pause duration.
    • <phoneme></phoneme> is used to mark multi-pronunciation words.
    • <say-as></say-as> is used to specify the reading method of digits or English letters.
    • <sub></sub> is used to set the alias of the marked text, that is, the alternative reading method.
    • <prosody></prosody> is used to control the local speaking speed.
    • <word></word> is used to set the selected text to the continuous reading mode.
      NOTE:

      MetaStudio contains multiple TTS timbres. The SSML tag capabilities supported by each timbre are different. You can obtain the tags supported by each timbre by calling the API for querying asset details.

speak

  • Description

    <speak></speak>: Root node of the SSML text.

  • Syntax
    1
    <speak>Enter the text with an SSML tag. </speak>
    
  • Property

    None

  • Tag relationship

    <speak> can contain text and tags, including <break>, <phoneme>, <say-as>, and <sub>.

break

  • Description

    break: Inserts a mute pause at any position.

  • Syntax
    1
    <break time="String"/>
    
  • Property
    Table 1 Property description

    Property Name

    Property Type

    Property Value

    Mandatory

    Description

    time

    String

    Value range: 200 ms to 10s

    No

    Mute pause duration, in milliseconds.

    strength

    String

    Options:

    • none: no rhythm
    • x-weak: very short rhythm
    • weak: short rhythm
    • medium: medium rhythm
    • strong: long rhythm
    • x-strong: very long rhythm

    No

    Definition of rhythm

  • Tag relationship

    Any other tag cannot be contained.

  • Example value
    1
    2
    One sentence<break time="200ms"/>another sentence
    One sentence<break strength="strong"/>another sentence
    

phoneme

  • Description

    <phoneme></phoneme>: Pronunciation of a multi-pronunciation Chinese or English word

  • Syntax
    1
    2
    <phoneme ph="string">Text </phoneme>
    The <phoneme ph="W EH1 DH AH0">weather</phoneme> is very good.
    
  • Property
    Table 2 Property description

    Property Name

    Property Type

    Property Value

    Mandatory

    Description

    ph

    String

    Pinyin or phoneme

    Yes

    • When you enter Chinese Pinyin, the tone is represented by 1, 2, 3, or 4. The value 5 indicates no tone.
    • CMU Pronouncing Dictionary
    • Example 1: The ph value of tian qi is tian1 qi4.
    • Example 2: The ph value of weather is weəðə(r).
  • Tag relationship

    Text can be included but any other tag cannot.

  • Example value
    1
    The<phoneme ph="tian1 qi1">weather</phoneme>is good today.
    
    NOTE:

    Obtain the Pinyin JS library based on Chinese characters. For details, see pinyin-pro.

say-as

  • Description

    <say-as></say-as>: Specifies text as a specific type of content, or spells an English word character by character.

  • Syntax
    1
    <say-as interpret-as="string">Digit or word</say-as>
    
  • Property
    Table 3 Property description

    Property Name

    Property Type

    Property Value

    Mandatory

    Description

    interpret-as

    String

    • number: number
    • date: date
    • figure: value
    • phone: phone number
    • english: English word
    • spell: spelling an English word character by character

    Yes

    The content is interpreted as a given type of reading method.

  • Tag relationship

    Text can be included but any other tag cannot.

  • Example value
    1
    2
    3
    4
    5
    6
    <say-as interpret-as="number">123</say-as>
    <say-as interpret-as="date">2022/3/8</say-as>
    <say-as interpret-as="figure">175 cm</say-as>
    <say-as interpret-as="phone">151 12345678</say-as>
    <say-as interpret-as="english">Hello</say-as>
    <say-as interpret-as="spell">Hello</say-as><!-- Read: H E L L O -->
    

sub

  • Description

    <sub></sub>: Finds an alternative reading method.

  • Syntax
    1
    <sub alias="string">Text</sub>
    
  • Property
    Table 4 Property description

    Property Name

    Property Type

    Property Value

    Mandatory

    Description

    alias

    String

    Alternative word

    Yes

    Replace the content of the tag with this value for reading.

  • Tag relationship

    Text can be included but any other tag cannot.

  • Example value
    What is actually read is Paul.
    1
    <sub alias="Paul">Paul</sub>is German.
    

prosody

  • Description

    <prosody></prosody>: Controls the local speaking speed.

  • Syntax
    1
    <prosody rate="50">Text </prosody>
    
  • Property
    Table 5 Property description

    Property Name

    Property Type

    Property Value

    Mandatory

    Description

    rate

    String

    Percentage of the speaking speed.

    The value ranges from 50 to 200.

    Example: 50, indicating that the reading speed is 0.5 times the normal speed.

    Yes

    Speaking speed

  • Tag relationship

    Text can be included but any other tag cannot.

  • Remarks
    1
    <prosody rate="50"> Hello, everyone. I'm a MetaStudio virtual human.</prosody>
    

word

  • Description

    <word></word>: Sets the selected text to the continuous reading mode. The selected text cannot contain punctuations or spaces.

  • Syntax
    1
    <word>Text</word>
    
  • Property

    None

  • Tag relationship

    Text can be included but any other tag cannot.

  • Remarks
    1
    <word>Hello, everyone. I'm a MetaStudio virtual human.</word>
    

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback