-
Notifications
You must be signed in to change notification settings - Fork 100
Installation
Get a copy of µSpeech of the home page (http://arjo129.github.com/uSpeech/). It is available as both a zip file and a Tarball. Installation occurs like any other library. You can read more about installation of libraries here: http://arduino.cc/en/Guide/Libraries.
Just like any other library µSpeech is meant to be installed in your arduino libraries folder under a
directory named uSpeech. Now comes the tricky part. Wire up a condenser mic with a pre-amp (see the [Hardware] section) and hook a microphone onto analog pin A0 and create a new sketch in the arduino IDE. Open the example installation>_speechAdvancedTraining
.
Upload the code to your arduino/AVR board then open the serial monitor. Follow the instructions. You will see a silence value. In my case it was 92. Open your arduino library directory find the source code of µSpeech. Open uspeech.h in a text editor. At the top you will see the following:
#include "Arduino.h"
#include <math.h>
#define SILENCE 92
Change the value of SILENCE to your value. Now you are set to get your first voice recognition
project going. There is also a f1 and f2 value. Open the file in the library named phoneme.cpp
Pick a value in between f1 and f2 and replace the 37 with it.
#if F_DETECTION > 0
micPower = 0.05 * maxPower() + (1 - 0.05) * micPower;
if (micPower>37) {
return 'f';
}
#endif
You are now ready to start your first project. Look over at the LED on/off tutorial and for your own project look at the getPhoneme()
reference.