Company
Date Published
Author
Nicolas Arcay Bermejo
Word count
434
Language
English
Hacker News points
None

Summary

To get started with this project, you'll need your Voiceflow Assistant Dialog API key. You must have this key every time you want to make a request to the /interact endpoint. The source of this project is publicly available on Github, where you can fork it and tweak it as you like. This project structure includes index.html, styles.css, scripts.js, siriwave.umd.min.js, and an image directory with selected images from Unsplash. The main function for interacting with the Voiceflow Dialog API is the `interact()` function in the scripts.js file, which sends a POST request to the Dialog API with the necessary headers, including the Version ID and API key. It also includes a config object in the body of the request to configure certain aspects of the interaction, such as enabling Text-to-Speech (TTS) and removing SSML tags. The response from the Dialog API is then processed by the `displayResponse()` function, which iterates through the items in the response and renders them on the webpage.