How-to: Use a VDK sample
This tutorial will provide you with everything you need to install, build and run a sample project.
The sample simple-application will be used during this tutorial, but the workflow stays the same for all sample projects.
It consists of two parts:
Some voice recognition to be able to detect some sentences,
Some voice synthesis to be able to get audio feedback upon recognition.
Download & Setup
Configuration & Data
Before running the sample, you must generate its configuration and install the data needed by the engines you selected during the install step.
Open the project inside the VDK Studio by double-clicking the project.vdk
file (Windows) or using the Import Project
menu in the Home screen.
On the left side-bar, you will find cards for Voice Recognition, Voice Synthesis, or both categories depending on the sample being tested. Click on them to open the corresponding widget, edit their properties to match the engine providers you’ve used during the Conan install phase prior, and compile the grammar or save the voice list configuration.
Once the grammar has been compiled, and/or the voice list has been saved, you can install the data into the project. On the bottom of the project side-bar, click the Export Project
button.
Select the root directory of the sample project as the export location and your target platform (leave default to test on the current machine).
Note: If you are using the same operating system as the target one, you can also use the Install Resources
button which will save you the choice of project path and current architecture.
Make sure that you have both directories config
and data
in your project directory before proceeding to the next step.
To learn more about the widgets and their detailed instructions, read the following articles:
Usage
Once started, you should see some logs in your terminal.
Since this sample project uses voice recognition, you can find the set of possible commands in the grammar file under the grammars
folder in the project root.
Grammar files follows the Backus Naur Form (BNF) format, which is further explained in its own article.
In the case of the simple-application
program, you could say things like:
I would like a coffee
I would like an orangina
(Any number, e.g.) 42
Once you say a sentence that gets recognized, the application will answer you with a sentence such as: “You just said <number> right?” or “Gotcha, you want a <drink>, I knew it.”