This demo will show you how to integrate Wit.ai (NLU service) and A-Frame (WebXR library) to build a voice enabled VR application (that can be adapted for AR as well). The app will allow users to ask our sudo AI voice assistant built with the Web-Speech-API to add 3D objects to our VR environment with voice commands, such as “Hey Jarvis, drop a box”.
- Create a Wit.ai account
- Use a Web-Speech-API compatible browser
- Use a WebGL compatible browser
- Have a microphone connected to your computer
- Create a new Wit.ai app
- Unzip and import
src/webxrwitvoice.zip
to your Wit.ai app - Update
TOKEN
insrc/voice.js
to the token obtained from your app’s Settings page - Open the
src/index.html
file in your browser - Allow microphone access
Below are some voice commands that are supported, but you can also go to your Wit.ai app and select Utterances to view and extend them:
- “drop a box”
- “add a cylinder”
- “drop a sphere”
- “I summon a box”
- “can you add a cylinder”
- “please add a cylinder”