Search code examples
alexa-skills-kitalexa-slot

Alexa custom skill break message into parts


I have a custom skill which supports queries like Give me some information about <something>. And the response is a long text (about 5 sentences). I want to break this response into multiple alexa responses. How can this be done?

Clarification on what I mean by multiple parts. Currently it is like this.

Me: give me some information on Nutrino
Alexa: A neutrino is a fermion that interacts only via the weak subatomic force and gravity. The mass of the neutrino is much smaller than that of the other known elementary particles.....

What I want is,

Me: give me some information on Nutrino
Alexa: A neutrino is a fermion that interacts only via the weak subatomic force and gravity.
Alexa: The mass of the neutrino is much smaller than that of the other known elementary particles.....

I looked at Progressive Response but that involved much more complexities than required in this case I assume. Also, I looked at ssml, it does not have any such feature as well.

Note: I don't want a pause in the speech, which can be achieved by break tag, but two actual separate messages. The motivation behind this is, I want to ask a question like "Do you need more information" after my response and that should not be in the same message as the one that contains the information.

I am using this.emit functions of nodejs-sdk currently for responding.


Solution

  • We can send response only once from lambda to alexa. So please try designing your code in below mentioned way.

    Me: give me some information on Nutrino
    Alexa: A neutrino is a fermion that interacts only via the weak subatomic force and gravity. Do you need more information?
    Me:  Yes
    Alexa: The mass of the neutrino is much smaller than that of the other known elementary particles.....
    

    As part of response we send use A neutrino is a fermion that interacts only via the weak subatomic force and gravity as prompt. Do you need more information? as reprompt. When user says Yes. Write a code in Yes Intent to answer your remaining statement The mass of the neutrino is much smaller than that of the other known elementary particles.

    Hope this helps