1

我正在使用 Node.js Alexa 库:alexa-sdk

我正在尝试在 SSML 响应中间嵌入音频。我可以在 SSML 响应的末尾添加音频标签,但不能在中间添加。

例如:

<speak> 
    You did great! 
    <audio src='https://s3.amazonaws.com/ask-soundlibrary/human/amzn_sfx_crowd_applause_05.mp3'/> 
    I had a lot of fun, I hope you did too! 
</speak>

当我将上述内容作为 SSML 发送时,Alexa 模拟器会合成“你做得很好!” 并停在那里。

有谁知道我做错了什么或如何使这项工作?在 SSML 文本中间嵌入音频标签不起作用吗?

即使是 alexa 文档也有一个中间有音频的例子,这对我在模拟器中不起作用。

谢谢你

PS我差不多10天前在亚马逊论坛上问过这个问题没有回复,这并不少见(不是最活跃的寻求帮助的地方)

4

1 回答 1

3

我试过你的 SSML,它工作正常。我在Voice & ToneAlexa 测试模拟器的选项卡中对其进行了测试。

两个 mp3 文件(一个来自评论)都按预期顺序播放。

<speak> 
    You did great! 
    <audio src='https://s3.amazonaws.com/ask-soundlibrary/home/amzn_sfx_door_open_01.mp3'/>
    I had a lot of fun, I hope you did too! 
    <audio src='https://s3.amazonaws.com/ask-soundlibrary/human/amzn_sfx_crowd_applause_05.mp3'/>
</speak>

<audio>标签在哪里并不重要。即使把它放在<speak>标签后面也能工作

<speak> 
    <audio src='https://s3.amazonaws.com/ask-soundlibrary/human/amzn_sfx_crowd_applause_05.mp3'/>
    You did great! 
    I had a lot of fun, I hope you did too! 
</speak>
于 2018-08-01T15:04:34.220 回答