0
votes

While testing my skill with the echo I experienced the following behavior:

When invoked by a non-intent request and this response:

public SpeechletResponse onLaunch(LaunchRequest request, Session session) throws SpeechletException {
    PlainTextOutputSpeech speech = new PlainTextOutputSpeech();
    speech.setText("Welcome");

    PlainTextOutputSpeech repromtSpeech = new PlainTextOutputSpeech();
    speech.setText("Repromt");
    Reprompt reprompt = new Reprompt();
    reprompt.setOutputSpeech(repromtSpeech);

    SimpleCard card = new SimpleCard();
    card.setTitle("Welcome");
    card.setContent("Test");

    return SpeechletResponse.newAskResponse(speech, reprompt, card);
}

Alexa only outputs the repromt text.

The actual interaction is:

  • User: alexa ask "Skill"
  • Alexa: Repromt "waiting for answer"

My expected/wanted interaction would be:

  • User: alexa ask "Skill"
  • Alexa: Welcome "waiting for answer"
  • User: "doesn't respond correctly"
  • Alexa: Repromt "waiting for answer"

How can I get my expected behavior? What is the speech text for if it is not (never?) included in the response?

1

1 Answers

0
votes

I think you have a mistake in your code. You are setting speech.setText twice. I think you meant to set repromptSpeech.setText the second time.