你当前正在访问 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”之后开始向左挥手。

屏幕截图显示了在左侧挥手的预生成虚拟形象。

支持的预生成虚拟形象角色、风格和手势

此处提供的预生成虚拟形象支持的手势完整列表也可以在文本转语音虚拟形象门户中找到。

角色 样式 笔势
Harry 业务 123
calm-down
come-on
five-star-reviews
良好
hello
introduce
invite
thanks
欢迎
Harry 休闲 123
come-on
five-star-reviews
gong-xi-fa-cai
良好
happy-new-year
hello
please
欢迎
Harry youthful 123
come-on

five-star
良好
hello
invite
show-right-up-down
欢迎
Jeff 业务 123
come-on
five-star-reviews
hands-up
此处
meddle
please2
显示
silence
thanks
Jeff formal 123
come-on
five-star-reviews
lift
please
silence
thanks
very-good
Lisa 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
Lisa 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
Lisa graceful-standing
Lisa 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
Lisa technical-standing
Lori 休闲 123-left
a-little
beg
calm-down
come-on
five-star-reviews
良好
hello
open
please
thanks
Lori graceful 123-left
applaud
come-on
introduce
nod
please
show-left
show-right
thanks
欢迎
Lori formal 123
come-on
come-on-left

five-star
良好
hands-triangle
hands-up
hi
乐观
thanks
最大值 业务 a-little-bit
click-the-link
display-number
encourage-1
encourage-2
five-star-praise
front-right
good-01
good-02
introduction-to-products-1
introduction-to-products-2
introduction-to-products-3
left
lower-left
number-one
press-both-hands-down-1
press-both-hands-down-2
push-forward
raise-ones-hand
right
say-hi
shrug-ones-shoulders
slide-from-left-to-right
slide-to-the-left
thanks
the-front
top-middle-and-bottom-left
top-middle-and-bottom-right
upper-left
upper-right
欢迎
最大值 休闲 a-little-bit
applaud
click-the-link
display-number
encourage-1
encourage-2
five-star-praise
front-left
good-1
good-2
hello
introduction-to-products-1
introduction-to-products-2
introduction-to-products-3
introduction-to-products-4
left
length
nodding
number-one
press-both-hands-down
raise-ones-hand
right
right-front
shrug-ones-shoulders
slide-from-left-to-right
slide-to-the-left
thanks
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
introduction-to-products-1
introduction-to-products-2
introduction-to-products-3
left
lower-left
lower-right
press-both-hands-down
push-forward
right
say-hi
shrug-ones-shoulders
slide-from-left-to-right
slide-to-the-left
the-front
top-middle-and-bottom-right
upper-left
upper-right
Meg 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
introduction-to-products-1
introduction-to-products-2
introduction-to-products-3
left
number-one
press-both-hands-down-1
press-both-hands-down-2
right
say-hi
shrug-ones-shoulders
slide-from-left-to-right
the-front
upper-left
upper-right
Meg 休闲 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
handclap
introduction-to-products-1
introduction-to-products-2
introduction-to-products-3
left
length
lower-left
lower-right
number-one
press-both-hands-down
right
say-hi
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
Meg 业务 a-little-bit
encourage-1
encourage-2
five-star-praise
front-left
front-right
good-1
good-2
introduction-to-products-1
introduction-to-products-2
introduction-to-products-3
left
length
number-one
press-both-hands-down-1
press-both-hands-down-2
raise-ones-hand
right
say-hi
shrug-ones-shoulders
slide-from-left-to-right
slide-to-the-left
spread-hands
thanks
the-front
upper-left

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

后续步骤