私はAlexa SkillでSSMLを使用しようとしています。私はラムダを私のサービスエンドポイントとして使用し、Jsはそれをプログラムします。今私の質問は、私は自分のスキルでこれを正しく実装する方法です。私はSSMLを使用するには、次の機能を使用しています:Alexa Skill + Lambda + Jsで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
};
}
マイコード:
function onLaunch(launchRequest, session, callback) {
console.log("onLaunch requestId=" + launchRequest.requestId
+ ", sessionId=" + session.sessionId);
var cardTitle = "Hello, World!";
var speechOutput = { type: "SSML",
ssml: "<speak>Welcome to Hubo help. <amazon:effect name='whispered'>You can ask questions like</amazon:effect>: 'How do I paint a wall?'. Now what can I help you with?.</speak>", };
callback(session.attributes,
buildSSMLSpeechletResponse(cardTitle, speechOutput, "", true));
}
を私はコールバックでミスをしたと思いますか?前もって感謝します!