question

Tanya Gupta avatar image
Tanya Gupta asked

I have a SpeakList array, but on deploying cancel intent, the speaklist item overlaps with the cancel command.

const CancelAndStopIntentHandler = {
    canHandle(handlerInput) {
        return Alexa.getRequestType(handlerInput.requestEnvelope) === 'IntentRequest'
            && (Alexa.getIntentName(handlerInput.requestEnvelope) === 'AMAZON.CancelIntent'
                || Alexa.getIntentName(handlerInput.requestEnvelope) === 'AMAZON.StopIntent');
    },
    handle(handlerInput)
        return handlerInput.responseBuilder
        .speak("Cancel and stop handler
        .withShouldEndSession(true)
        .getResponse();
    }
};


"mainTemplate": {
    "parameters": [
      "imageListData"
    ],
    "items": [{
      "type": "AlexaImageList",
      "listId": "myImageListWithItemsToSpeak",
      "listItems": "${imageListData.properties.listItemsToShow}",
      "speechItems": "${imageListData.properties.listItemsToShow}
       "primaryText": "${imageListData.properties.listItemsToShow.primary
    }
  ]
  },
  "onMount": [
    {
      "type": "SpeakList",
      "delay": 5000,
      "componentId": "myImageListWithItemsToSpeak",
      "start": 0,
      "count": "${imageListData.properties.listItemsToShow.length}",
      "minimumDwellTime": 1000,
      "align": "center"
    }
  ]
}

What happens is that the list item that the device is showing continues for a few seconds after a "stop" command, so there is some overlap in audio


How can I fix this? Sample code would be appreciated.

aplalexa skills
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

0 Answers