Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pause in alexa sdk v2 responsebuilder

In Alexa V1 a pause can be easily built in response by using ssml.

this.emit(':tell', "Pause now <break time='1s'/>. Start again");

But in Alexa SDK V2, the code (encoding the special characters):

handle(handlerInput) {
    return handlerInput.responseBuilder
      .speak( "Pause now &lt;break time="1s"/&gt;. Start again")
      .getResponse();
  },

gives the response without the pause, but repeating the sentence below. "Pause now . Start again"

How do we then put a pause in response builder of Alexa SDK v2?

like image 791
user3141181 Avatar asked Feb 19 '26 04:02

user3141181


1 Answers

Looks like syntax issues. I have tested a similar snippet in my test skill. This should work well.

handle(handlerInput) {
    return handlerInput.responseBuilder
      .speak('Pause now <break time="1s"/>. Start again')
      .getResponse();
},
like image 130
Valerian Pereira Avatar answered Feb 21 '26 18:02

Valerian Pereira



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!