Alexa Skill 在网站上有效,returns "Something went wrong" 在设备上有效
Alexa Skill Works in Website, returns "Something went wrong" on device
我是开发 Alexa 技能的新手,但我创建了一个非常简单的技能,它是用 C# 编写并托管在 Azure 中的。目前它只是 returns 一条 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 上测试它时,它显示 "Something went wrong"。
我已经检查并启用了该技能,并且它使用的是正确的帐户。
无论如何,是否有更多细节来了解正在发生的事情?
问题出在我为技能指定的语言。
我住在英国,并将语言发送为英语 (U.S),这意味着该技能将在美国的技能商店中(但不在英国技能商店中)。
添加新语言(设置为英语 U.K。)允许在英国的设备上测试该技能。
我是开发 Alexa 技能的新手,但我创建了一个非常简单的技能,它是用 C# 编写并托管在 Azure 中的。目前它只是 returns 一条 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 上测试它时,它显示 "Something went wrong"。
我已经检查并启用了该技能,并且它使用的是正确的帐户。
无论如何,是否有更多细节来了解正在发生的事情?
问题出在我为技能指定的语言。
我住在英国,并将语言发送为英语 (U.S),这意味着该技能将在美国的技能商店中(但不在英国技能商店中)。
添加新语言(设置为英语 U.K。)允许在英国的设备上测试该技能。