我正在开发一个网络服务,用于处理 Alexa 发送的请求并在 .net 框架中以特定响应进行响应。 Alexa 以 JSON 格式发送到您的服务的请求正文,如下所示:
{
"version": "string",
"session": {
"new": true,
"sessionId": "string",
"application": {
"applicationId": "string"
},
"attributes": {
"string": {}
},
"user": {
"userId": "string",
"accessToken": "string"
}
},
"context": {
"System": {
"application": {
"applicationId": "string"
},
"user": {
"userId": "string",
"accessToken": "string"
},
"device": {
"supportedInterfaces": {
"AudioPlayer": {}
}
}
},
"AudioPlayer": {
"token": "string",
"offsetInMilliseconds": 0,
"playerActivity": "string"
}
},
"request": {}
}
and 响应主体语法Json 格式如下:
{
"version": "string",
"sessionAttributes": {
"string": object
},
"response": {
"outputSpeech": {
"type": "string",
"text": "string",
"ssml": "string"
},
"card": {
"type": "string",
"title": "string",
"content": "string",
"text": "string",
"image": {
"smallImageUrl": "string",
"largeImageUrl": "string"
}
},
"reprompt": {
"outputSpeech": {
"type": "string",
"text": "string",
"ssml": "string"
}
},
"directives": [
{
"type": "string",
"playBehavior": "string",
"audioItem": {
"stream": {
"token": "string",
"url": "string",
"offsetInMilliseconds": 0
}
}
}
],
"shouldEndSession": boolean
}
}
我在亚马逊开发者论坛上进行了研究将自定义技能托管为 Web 服务 https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/developing-an-alexa-skill-as-a-web-service , 处理 Alexa 发送的请求 https://developer.amazon.com/public/solutions/alexa/alexa-skills-kit/docs/handling-requests-sent-by-alexa但我无法实现这一目标,并且我没有使用一件事Lambda我想要自定义技能,但我的位置不在North US.
我得到了自由党。来自 githubhere https://github.com/AreYouFreeBusy/AlexaSkillsKit.NET并在我的网络服务中使用,但无法与该库同步,这里的任何人都可以给我一个方向,我该如何做到这一点或我如何开始,提前致谢。