Alexa 服务响应包含 "Speechlet response" 其中包含一张额外的卡片,不确定为什么?

Alexa service response contains "Speechlet response" which contains an extra card, unsure why?

我已经创建了我的第一个测试 alexa 技能,它应该做的就是让 Alexa 侮辱你。 (我知道这已经创建了,但这只是一个测试) 我一直在学习教程,但现在当我在 echo 上打开技能时,我得到的响应是 "Sorry, something went wrong"。 被调用的代码是

this.emit(":tellWithCard", speechOutput, SKILL_NAME, randomInsult);

这是我在服务模拟器上得到的服务响应:

    {
      "version": "1.0",
      "response": {
        "outputSpeech": {
          "ssml": "<speak> Nah shut up, you bad little weapon </speak>",
          "type": "SSML"
        },
        "card": {
          "content": "Nah shut up, you bad little weapon",
          "title": "Insulter"
        },
        "speechletResponse": {
          "outputSpeech": {
            "ssml": "<speak> Nah shut up, you bad little weapon </speak>"
          },
          "card": {
            "content": "Nah shut up, you bad little weapon",
            "title": "Insulter"
          },
          "shouldEndSession": true
        }
      },
      "sessionAttributes": {}
    }

在我遵循的教程中,speechlet 响应不在服务响应中,有人知道为什么它现在包含在我的响应中吗?我不确定我的代码是否存在错误,或者 Lambda 函数的工作方式是否发生了变化。这是 cloudwatch 上的回复:

    21:12:48
    START RequestId: 4085e037-b9c9-11e7-b5e8-23df701a71f2 Version: $LATEST
    
    21:12:48
    2017-10-25T21:12:48.029Z    4085e037-b9c9-11e7-b5e8-23df701a71f2    
    Warning: Application ID is not set
    
    21:12:48
    END RequestId: 4085e037-b9c9-11e7-b5e8-23df701a71f2
    
    21:12:48
    REPORT RequestId: 4085e037-b9c9-11e7-b5e8-23df701a71f2  Duration: 0.68 
    ms  Billed Duration: 100 ms Memory Size: 128 MB Max Memory Us

这是我的 index.js 代码:

"use strict";

//Variables
var Alexa = require("alexa-sdk");
var SKILL_NAME = "Insulter";
var APP_ID = "";

//List of insults
var INSULT_LIST = [
    "Nah shut up, you bad little weapon",
    "Sample insult 2",
    "Sample insult 3"
];


//Setup
exports.handler = function(event, context, callback){
    var alexa = Alexa.handler(event,context);
    alexa.APP_ID = APP_ID;
    alexa.registerHandlers(handlers);
    alexa.execute();
}

var handlers = {
    'LaunchRequest': function(){
        this.emit('GetInsult');
    },
    'GetInsultIntent': function() {
        this.emit('GetInsult');
    },
    'GetInsult' : function() {
        var insultIndex = Math.floor(Math.random()*INSULT_LIST.length);
        var randomInsult = INSULT_LIST[insultIndex];

        //Output
        var speechOutput = randomInsult;

        this.emit(":tellWithCard", speechOutput, SKILL_NAME, randomInsult);
    },
    'AMAZON.HelpIntent' : function() {
        var speechOutput = "You can say give me an insult, or, you can say exit.";
        var reprompt = "What can I help you with?";
        this.emit(":ask", speechOutput, reprompt);
    },
    'AMAZON.StopIntent' : function() {
        this.emit(":tell","Goodbye!");
    },
    'AMAZON.CancelIntent' : function() {
        this.emit(":tell","Goodbye!");
    }
}

第四个参数 (according to amazon is this.emit(':tellWithCard', speechOutput, cardTitle, cardContent, imageObj);) 是一个 imageObj,您正试图将语音字符串放在那里,我相信这就是您的 alexa 崩溃的原因。将图像放在那里或将其完全删除。

我已经解决了我遇到的问题。事实证明,问题是我使用的是英语 (U.S),尽管我有一个英国 Alexa,并将亚马逊开发者控制台上的内容更改为英语 (U.K),一切都按预期进行。无论如何谢谢!