I have certain doubts related to Alexa responses.
1. this.emit(':ask', speechOutput, repromptSpeech)
I know that this.emit(':tell',speechOutput)
will cause alexa to speak the speechOutput
and then close the session, and this.emit(':ask', speechOutput, repromptSpeech)
will not close the session, and Alexa will wait for user Input. But where will this new input (given by the user) be stored. For eg:
User: What is the day on 2nd of "blah blah blah" {This was supposed to be a slot input}
Alexa: Sorry I didn't get the date /*speechOutput*/
. Will you repeat it for me? /*repromptSpeech*/
User: It was 2nd of January, 2018.
Now where will this new information 2nd of January, 2018 will be stored. Is there any function where I can pass a parameter which will store the new response of the user?
2. `this.emit(':responseReady')`
If I use this.response.speak(speechOutput)
multiple times in my skill without calling the function this.emit(':responseReady')
, will it work as expected, or will Alexa just speak the speechOutput
which is encountered first?
3. How to make the conversation interactive?
In my skill I'm providing a lot of data to the user which is not good. What I was doing till now is:
I. Get the result from web
II. Build a single response (
speechOutput
) of all the data (which contains more than 100 lines)III. Speak the
speechOutput
usingthis.emit(':tell',speechOutput)
But I want to know is there a way so that I can give 2 or 3 lines of response to user and then ask 'Do you want to know more?'. And based on the answer of the user i.e. 'Yes' or 'No', I will tell more results or just exit
from the skill.