Alexa Skill Kit (ASK) 内在意图“AMAZON.NUMBER”,将数字单词(“五”)转换为数字(例如“5”)。如何将 Alexa AMAZON.NUMBER 转换回数字单词(“五”)以便 Alexa 说出它?
试:
"CheckNumberIntent": function (intent, session, response) {
var numberSlot = intent.slots.Number,
numberName;
speech = "Dude you said" + numberSlot + "we should hang out";
var speechOutput = {
speech: speech,
type: AlexaSkill.speechOutputType.PLAIN_TEXT
};
response.tellWithCard(speechOutput, "Greeter", "Hello World!");
这导致:
"response": {
"outputSpeech": {
"type": "PlainText",
"text": "Dude you said[object Object]we should hang out"
},