Amazon Alexa SetVolume Директива - PullRequest
       9

Amazon Alexa SetVolume Директива

0 голосов
/ 23 октября 2018

Я пытаюсь реализовать интерфейс Alexa.Speaker с помощью Node.js v2 sdk.

При тестировании я всегда получаю вывод: There was a problem with the requested skill's response и эта ошибка в моих журналах CloudWatch:

{
    "type": "SessionEndedRequest",
    "requestId": "amzn1.echo-api.request.bf854d70-70c1-4e7f-b2b0-76c4574244a5",
    "timestamp": "2018-10-22T16:58:12Z",
    "locale": "en-US",
    "reason": "ERROR",
    "error": {
        "type": "INVALID_RESPONSE",
        "message": "An exception occurred while dispatching the request to the skill."
    }
}

Вот мой код.

return handlerInput.responseBuilder
    .addDirective({
        type: 'Alexa.Speaker',
        name: 'SetVolume',
        payload: {
            volume: volume,
        },
        token: 'correlationToken',
    })
    .getResponse();

Ранее я реализовал интерфейс Connections.SendRequest таким образом, поэтому я не уверен, что не так / отличается от Alexa.Speaker.

...