【问题标题】:Alexa Skill Works in Website, returns "Something went wrong" on deviceAlexa Skill 在网站上工作,在设备上返回“出现问题”
【发布时间】:2018-01-17 09:06:53
【问题描述】:

我是开发 Alexa 技能的新手,但我创建了一个非常简单的技能,它是用 C# 编写并托管在 Azure 中的。目前它只是返回一条 JSON 消息。

public class AlexaController : ApiController
{
    [HttpPost, Route("api/alexa/demo")]
    public dynamic Pluralsight(dynamic request)
    {
        string version;
        version = "5";
        return new
        {
            version = "1.0",
            sessionAttributes = new { },
            response = new
            {
                outputSpeech = new
                {
                    type = "PlainText",
                    text = $"Finance build is version, {version}"
                },
                card = new
                {
                    type = "Simple",
                    title = "TeamCity",
                    content = "Version identifier"
                },
                shouldEndSession = true
            }
        };

    }

我的话是:

    HelloWorldIntent hello
    HelloWorldIntent hi
    AMAZON.HelpIntent assistance needed please
    AMAZON.HelpIntent i need assistance

意图架构是:

    {
      "intents": [
        {
          "intent": "HelloWorldIntent"
        },
        {
          "intent": "AMAZON.HelpIntent"
        }
      ]
    }

在网站上测试时效果很好:

    {
      "version": "1.0",
      "response": {
        "outputSpeech": {
          "text": "Finance build is version, 5",
          "type": "PlainText"
        },
        "card": {
          "content": "Version identifier",
          "title": "TeamCity"
        },
        "speechletResponse": {
          "outputSpeech": {
            "text": "Finance build is version, 5"
          },
          "card": {
            "content": "Version identifier",
            "title": "TeamCity"
          },
          "shouldEndSession": true
        }
      },
      "sessionAttributes": {}
    }

但是,当我在 Echo Dot 上对其进行测试时,它显示“出了点问题”。

我已检查并且该技能已启用并且它正在使用正确的帐户。
是否有更多关于正在发生的事情的详细信息?

【问题讨论】:

  • 看看cloudwatch捕获异常
  • 我对 cloudwatch 没有任何经验,但我会看看。几乎就像没有启用该技能(但它是)并且 Alexa 没有(或不能)调用 Azure Web api。

标签: c# alexa alexa-skills-kit


【解决方案1】:

问题在于我为技能指定的语言。
我在英国,并将语言发送到英语(美国),这意味着该技能将在美国的技能商店中(但不在英国技能商店中)。

添加新语言(设置为英国英语)允许在我在英国的设备上测试该技能。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-06-02
    • 2017-08-22
    • 2021-10-07
    • 2016-02-20
    • 2013-01-10
    相关资源
    最近更新 更多