|Speech Recognition with Arduino and BitVoicer Server
|Page 1 of 1|
|Author:||msb4180 [ Fri Dec 04, 2015 12:57 pm ]|
|Post subject:||Speech Recognition with Arduino and BitVoicer Server|
In this post I am going to show how to use an Arduino board and BitVoicer Server to control a few LEDs with voice commands. I will be using the Arduino Micro in this post, but you can use any Arduino board you have at hand.
The following procedures will be executed to transform voice commands into LED activity:
The video above shows the final result of this post. Note in the video that BitVoicer Server also provides synthesized speech feedback. This speech feedback is defined in the server and reproduced by the server audio adapter, but the synthesized audio could also be sent to the Arduino and reproduced using a digital-to-analog converter (DAC). In my next post, I am going to show how to use the Arduino DUE, one amplified and one speaker to reproduce the synthesized speech using the Arduino itself.
List of Materials:
|Author:||msb4180 [ Fri Dec 04, 2015 1:05 pm ]|
|Post subject:||Speech Recognition with Arduino and BitVoicer Server - STEP1|
STEP 1: Wiring
The first step is to wire the Arduino and the breadboard with the components as shown in the pictures below.
The most important detail here refers to the analog reference provided to the Arduino ADC. In my tests, I got better results using 3.3V with the Sparkfun Electret Breakout. That is why I added a jumper between the 3.3V pin and the AREF pin. If you decide to use the analogRead funcion (for any reason) while 3.3V is being applied to the AREF pin, you MUST call analogReference(EXTERNAL) before you use the analogRead function. Otherwise, you will short together the active reference voltage (internally generated) and the AREF pin, possibly damaging the microcontroller on your Arduino board.
|Author:||msb4180 [ Fri Dec 04, 2015 1:20 pm ]|
|Post subject:||Speech Recognition with Arduino and BitVoicer Server - STEP2|
STEP 2: Uploading the code to the Arduino
Now you have to upload the code below to your Arduino. You can also download the Arduino sketch from the link at the bottom. Before you upload the code, you must properly install the BitVoicer Server libraries into the Arduino IDE (Importing a .zip Library).
This sketch has four major parts:
Arduino Sketch: BVS_Demo1.ino
|Author:||msb4180 [ Fri Dec 04, 2015 1:33 pm ]|
|Post subject:||Speech Recognition with Arduino and BitVoicer Server - STEP3|
STEP 3: Importing BitVoicer Server Solution Objects
Now you have to set up BitVoicer Server to work with the Arduino. BitVoicer Server has four major solution objects: Locations, Devices, BinaryData and Voice Schemas.
Locations represent the physical location where a device is installed. In my case, I created a location called Home.
Devices are the BitVoicer Server clients. I created a Mixed device, named it ArduinoMicro and entered the communication settings. NOTE ABOUT ARDUINO MICRO: it uses RTS and DTR so you have to enable these settings in the communication tab. I also created a SystemSpeaker device to synthesize speech using the server audio adapter.
BinaryData is a type of command BitVoicer Server can send to client devices. They are actually byte arrays you can link to commands. When BitVoicer Server recognizes speech related to that command, it sends the byte array to the target device. I created one BinaryData object to each pin value and named them ArduinoMicroGreenLedOn, ArduinoMicroGreenLedOff and so on. I ended up with 18 BinaryData objects in my solution, so I suggest you download and import the objects from the VoiceSchema.sof file below.
Voice Schemas are where everything comes together. They define what sentences should be recognized and what commands to run. For each sentence, you can define as many commands as you need and the order they will be executed. You can also define delays between commands. That is how I managed to perform the sequence of actions you see in the video.
You can import (Importing Solution Objects) all solution objects I used in this post from the files below. One contains the Devices and the other contains the Voice Schema and its Commands.
Solution Object Files:
|Author:||msb4180 [ Fri Dec 04, 2015 1:38 pm ]|
|Post subject:||Speech Recognition with Arduino and BitVoicer Server - STEP4|
STEP 4: Conclusion
That is it! I hope you liked it.
You have everything you need to run the demo shown in the video. Note that in the video I started by enabling the ArduinoMicro device in the BitVoicer Server Manager. As soon as it gets enabled, the Arduino identifies an available Speech Recognition Engine and starts streaming audio to BitVoicer Server.
You can follow the recognition results in the Server Monitor tool available in the BitVoicer Server Manager.
In my next post I will show how you can reproduce synthesized speech using an Arduino DUE.
|Page 1 of 1||All times are UTC - 5 hours [ DST ]|
|Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group