Violet v0.7: Adding the Nuts and Bolts

This has been a fun release. As we have gotten feedback from a lot of people, we have spent the time better understanding what our focus for Violet is, iterating/refining features, and maturing the code. While doing all that there was so much in flux internally that we decided to skip the v0.6 release.

In this release beyond iterating on feedback we focused on a number of software maturity milestones:

  • We started adding a significant amount of API Documentation using JSDoc, wrote a plugin to extract intent documentation from the code, and generated this website to allow viewing it. While doing this we worked on simplifying usage of out API’s.

  • We added a significant amount of automated tests using mocha and integrated travis to run them with every commit. Our focus has been to add tests which allow us to refactor and increase the extensibility of the framework while keeping our API steady.

  • We started measuring code coverage using istanbul and tracking using Codecov. Our code coverage is right now at about 75% and is likely to stay there as the voice landscape changes rapidly and we try supporting it.

We also spent a significant amount of effort on improving the samples that we have built to easy people getting started with Violet.

  • We moved the sample code out to a separate violet-samples project.
  • We added a deploy to heroku button so that people can try out the different samples easily. We also parameterized server.js so that most of the scripts can be launched independently in the samples.
  • We added samples that help you manage your ToDo List (using the Quip API) and help you find restaurants (using the Yelp Fusion API).
  • We added minor improvements such as demonstrating using Literal’s properly by including Sample Values.

In order to support the above and based on user feedback we added a few capabilities to Violet:

  • Improve Conversation Configurability: Support was added for a spoken rate to be set at the script level (and outputted to SSML). Individual responses to the user from a script typically have a short pause in between them, now support has been added for the say function to add them without a pause using the quick flag. Conversations in Violet are typically assumed to be continuing, now support has been added to endConversations by a script.
  • Simplification of Script Variables: Violet has moved away from supporting for three classes of script variables (previously scripts could choose between [[input]] variables, {{session}} variables, and «storage backed» variables) to now only supporting session variables. Additionally, input variables are automatically ‘upgraded’ to become session variables and can therefore be accessed uniformly.
  • Improved Questioning of Users: Violet now supports allowing scripts to either ask one question at a time or to prompt the user for up to 3 pieces of information at a time.
  • Added a PostgreSQL database plugin.
  • Updated Tooling: Violet scripts now have a significantly updated web interface when run locally, designed around the main developer use cases, and allow for easily testing their scripts, or for registering the script on Alexa. When the server launches Violet now displays the url that the server can be accessed at to ease opening it up. Violet now also includes a set of utilities to get values from a separate file (helpful when populating sample values for literals or loading a large set of values for custom type).