Actions on Google Dialog Flow add-on. VoiceRepeater is a drop in module that repeats the last prompt with a prefix.
You need to run the following in the directory of your package.json:
npm install voice-repeater --save
You need to add something like the following to your code:
If you are following the action map pattern, there are four things you need to do in the code
- Add require statement
- Configure VoiceRepeater
- Add function handler
- Register function handler
const VoiceRepeater = VoiceRepeater; // Add require statementexportsyourFunction = functionshttps;
Add changes to API.AI
You should create an intent that will trigger when you want the voice app to repeat itself.