My Approach
The project was broken up into three smaller projects: Text Input/Output, Audio Input/Output, VR Demo with Audio Input/Output. The purpose of breaking the project up into smaller pieces was to allow the developer to easily implement as much or little of this project as they would like to their own. To keep the design modular, a Scriptable Object Event System architecture was created. With this system a developer can easily replace components of the design for their specific needs. This event system also creates a nice visual understanding of the code as shown in the Unity Herarchy Window.
Microphone data is converted to text by Watson Speech-to-Text. Text from Watson is then sent to Pandorabots. Pandorabots text response is then converted to speech by Google Cloud Text-to-Speech, and this data is then saved to the drive and played back. To keep frame rates down saving the audio to disk was done through multithreading.
Text Input/Output
The first step was to implement the Pandorabots API into Unity. A simple UI was created to type and send messages to Pandorabots and receive a text response from the developer’s custom chatbot.