Search code examples
node.jsdialogflow-esactions-on-google

Delay between responses


I am using dialogflow to build an open-ended response. This is the code:

app.intent('First', (conv) =>{
    conv.ask(qstion[3]);
    conv.add('Option 1 : ' + option[3][0] + 'Option 2: ' + option[3][1]);
}); 

Here, qstion[3] contains the question to be asked. option[3][0] is 'yes' and option[3][1] is 'no'. The speed in which the assistant speaks the option 1 and option 2 is very quick. Is there any way where I can put a delay between the two options?


Solution

  • If you wish to change the response from Google Assistant, have a look at SSML. It is a powerful feature that allows you to tweak response in many different ways.

    To add a delay in the speech of Google Assistant, you will need the break property from SSML.