你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

使用 SSML 自定义文本转语音虚拟形象手势

包含输入文本的语音合成标记语言 (SSML) 确定了文本转语音输出的结构、内容和其他特征。 大多数 SSML 标记还可以在文本转语音虚拟形象中使用。 此外,文本转语音虚拟形象批处理模式通过使用格式为 <bookmark mark='gesture.*'/> 的 SSML 书签元素提供虚拟形象手势插入功能。

手势从插入时间点开始。 如果手势比音频花费的时间更多,则手势会在音频完成时间点被切断。

书签示例

以下示例演示如何使用 SSML 在文本转语音虚拟形象批量合成中插入手势。

<speak version="1.0" xmlns="http://www.w3.org/2001/10/synthesis" xml:lang="en-US">
<voice name="en-US-AvaMultilingualNeural">
Hello <bookmark mark='gesture.wave-left-1'/>, my name is Ava, nice to meet you!
</voice>
</speak>

在此示例中,虚拟形象将在说出“Hello”之后开始向左挥手。

屏幕截图显示了在左侧挥手的标准虚拟形象。

注释

当前,当在自定义文本转语音的虚拟形象中选择语音同步功能时,不支持手势功能。

支持的标准头像字符、样式和手势

此处提供的标准头像支持手势的完整列表也可以在文本到语音虚拟形象门户中找到。

角色 样式 笔势
哈利 业务 123
平静下来
come-on
five-star-reviews
良好
你好
introduce
invite
谢谢
欢迎
哈利 休闲 123
come-on
five-star-reviews
gong-xi-fa-cai
良好
新年快乐
你好
please
欢迎
哈利 youthful 123
come-on

five-star
良好
你好
invite
show-right-up-down
欢迎
杰夫 业务 123
come-on
five-star-reviews
hands-up
此处
meddle
please2
显示
沉默
谢谢
杰夫 formal 123
come-on
five-star-reviews
电梯
please
沉默
谢谢
very-good
丽莎 casual-sitting numeric1-left-1
numeric2-left-1
numeric3-left-1
thumbsup-left-1
show-front-1
show-front-2
show-front-3
show-front-4
show-front-5
think-twice-1
show-front-6
show-front-7
show-front-8
show-front-9
丽莎 graceful-sitting wave-left-1
wave-left-2
thumbsup-left
show-left-1
show-left-2
show-left-3
show-left-4
show-left-5
show-right-1
show-right-2
show-right-3
show-right-4
show-right-5
丽莎 graceful-standing
丽莎 technical-sitting wave-left-1
wave-left-2
show-left-1
show-left-2
point-left-1
point-left-2
point-left-3
point-left-4
point-left-5
point-left-6
show-right-1
show-right-2
show-right-3
point-right-1
point-right-2
point-right-3
point-right-4
point-right-5
point-right-6
丽莎 technical-standing
罗莉 休闲 123-left
a-little
beg
平静下来
come-on
five-star-reviews
良好
你好
打开
please
谢谢
罗莉 graceful 123-left
鼓掌
come-on
introduce
点头
please
show-left
show-right
谢谢
欢迎
罗莉 formal 123
come-on
come-on-left

five-star
良好
hands-triangle
hands-up
你好
乐观
谢谢
最大值 业务 a-little-bit
click-the-link
display-number
encourage-1
encourage-2
five-star-praise
front-right
good-01
good-02
产品介绍-1
产品介绍-第二部分
introduction-to-products-3
left
左下角
number-one
press-both-hands-down-1
press-both-hands-down-2
push-forward
raise-ones-hand

打招呼
shrug-ones-shoulders
从左到右滑动
slide-to-the-left
谢谢
the-front
top-middle-and-bottom-left
top-middle-and-bottom-right
upper-left
upper-right
欢迎
最大值 休闲 a-little-bit
鼓掌
click-the-link
display-number
encourage-1
encourage-2
five-star-praise
front-left
good-1
good-2
你好
产品介绍-1
产品介绍-第二部分
introduction-to-products-3
introduction-to-products-4
left
length
点头
number-one
press-both-hands-down
raise-ones-hand

right-front
shrug-ones-shoulders
从左到右滑动
slide-to-the-left
谢谢
the-front
upper-left
upper-right
欢迎
最大值 formal a-little-bit
click-the-link
display-number
encourage-1
encourage-2
five-star-praise
front-left
front-right
good-1
good-2
产品介绍-1
产品介绍-第二部分
introduction-to-products-3
left
左下角
右下角
press-both-hands-down
push-forward

打招呼
shrug-ones-shoulders
从左到右滑动
slide-to-the-left
the-front
top-middle-and-bottom-right
upper-left
upper-right
梅 格 formal a-little-bit
click-the-link
display-number
encourage-1
encourage-2
five-star-praise
front-left
front-right
good-1
good-2
hands-forward
产品介绍-1
产品介绍-第二部分
introduction-to-products-3
left
number-one
press-both-hands-down-1
press-both-hands-down-2

打招呼
shrug-ones-shoulders
从左到右滑动
the-front
upper-left
upper-right
梅 格 休闲 a-little-bit
click-the-link
cross-hand
display-number
encourage-1
encourage-2
five-star-praise
front-left
front-right
good-1
good-2
掌声
产品介绍-1
产品介绍-第二部分
introduction-to-products-3
left
length
左下角
右下角
number-one
press-both-hands-down

打招呼
shrug-ones-shoulders
slide-from-right-to-left
slide-to-the-left
spread-hands
the-front
top-middle-and-bottom-left
top-middle-and-bottom-right
upper-left
upper-right
梅 格 业务 a-little-bit
encourage-1
encourage-2
five-star-praise
front-left
front-right
good-1
good-2
产品介绍-1
产品介绍-第二部分
introduction-to-products-3
left
length
number-one
press-both-hands-down-1
press-both-hands-down-2
raise-ones-hand

打招呼
shrug-ones-shoulders
从左到右滑动
slide-to-the-left
spread-hands
谢谢
the-front
upper-left

实时文本转语音 API 支持除 lisa-graceful-sittinglisa-graceful-standinglisa-technical-sittinglisa-technical-standing 之外的所有样式。 手势仅支持批处理合成 API,不支持实时 API。

后续步骤