webxr-voice-demo
webxr-voice-demo copied to clipboard
Code sample that demonstrates how to integrate a voice user interface with WebXR using Wit.ai, Web-Speech-API, and A-Frame.
Wit.ai WebXR Voice Demo
Overview
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 Gizmo, drop a box”.
https://user-images.githubusercontent.com/857822/136882544-9e5fc28b-31d8-4835-8ef6-c5c520f5e0a2.mp4
Slides for Building Immersive Voice XR Experiences with Wit.ai.pdf
Prerequisites
- Create a Wit.ai account
- Use a Web-Speech-API compatible browser
- Use a WebGL compatible browser
- Have a microphone connected to your computer
Launch the Demo Setup
- Create a new Wit.ai app
- Unzip and import
src/wit_example.zipto your Wit.ai app - Update
CLIENT_TOKENinsrc/voice.jsto the client token obtained from your app’s Settings page - Open the
src/index.htmlfile in your browser - Allow microphone access
Supported Voice Commands
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”
References
Contributing
See the CONTRIBUTING file for how to help out.
License
Wit.ai WebXR Voice Demo is licensed, as found in the LICENSE file.