我试图处理更好的语音发音和暂停与Alexa+Lambda+Javascript。我从docs:https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/speech-synthesis-markup-language-ssml-reference中看到,您可以使用语音合成标记语言这样做。但是,当我构建并发送Javascript对象以便Alexa可以说什么时,我会收到错误消息。
这是我要从Lambda日志文件中发送Alexa的属性:
{ outputSpeech: { type: 'SSML', ssml: '<speak>This output speech uses SSML.</speak>' } }知道我到底错过了什么吗?
提前谢谢。
发布于 2016-07-20 17:01:48
确保您更新了buildSSMLSpeechletResponse。我添加了一个与回调一起使用的新函数,这样我就可以将SSML输出用于正确的区域。
function buildSSMLSpeechletResponse(title, output, repromptText, shouldEndSession) {
return {
outputSpeech: {
type: "SSML",
ssml: output
},
card: {
type: "Simple",
title: "SessionSpeechlet - " + title,
content: "SessionSpeechlet - " + output
},
reprompt: {
outputSpeech: {
type: "SSML",
text: repromptText
}
},
shouldEndSession: shouldEndSession
};
}
发布于 2019-10-16 12:03:26
您只需在存储响应的SSMl变量中使用speechOutput标记即可。这种方法也有效。
https://stackoverflow.com/questions/37871148
复制相似问题