loading
In this project I use BitVoicer’s speech recognition features (http://www.bitsophia.com/BitVoicer.aspx), one Arduino board and one electret microphone (https://www.sparkfun.com/products/9964) to control a few LEDs.

This project is similar to the one in my first post (http://www.instructables.com/id/Speech-Recognition-with-BitVoicer-and-Arduino/), but now I use audio streaming to send audio to BitVoicer.

The fritzing schematic I added to this instructable shows how I wired my Arduino board.

I’m also adding a few pictures and a YouTube video of the project running.


Unfortunately, the sketch I wrote for my first post is no longer supported by the new version of BitVoicer. Here is the new sketch:

#include <BitVoicer11.h>

//Instantiates the BitVoicerSerial class
BitVoicerSerial bvSerial = BitVoicerSerial();

//Stores true if the Audio Streaming Calibration tool
//is running
boolean sampleTest = false;
//Stores the data type retrieved by getData()
byte dataType = 0;
//Sets up the pins and default variables
int pinR = 3;
int pinY = 5;
int pinG = 6;
int lightLevel = 0;

void setup()
{
  //Sets the analog reference to external (AREF pin)
  //WARNING!!! If anything is conected to the AREF pin,
  //this function MUST be called first. Otherwise, it will
  //damage the board.
  bvSerial.setAnalogReference(BV_EXTERNAL);
  //Sets up the microcontroller to perform faster analog reads
  //on the specified pin
  bvSerial.setAudioInput(0);
  //Starts serial communication at 115200 bps
  Serial.begin(115200);
  //Sets up the pinModes
  pinMode(pinR, OUTPUT);
  pinMode(pinY, OUTPUT);
  pinMode(pinG, OUTPUT);
}

void loop()
{
  //Captures audio and sends it to BitVoicer if the Audio
  //Streaming Calibration Tool is running
  if (sampleTest == true)
  {
    //The value passed to the function is the time
    //(in microseconds) that the function has to wait before
    //performing the reading. It is used to achieve about
    //8000 readings per second.
    bvSerial.processAudio(46);
  }
 
  //Captures audio and sends it to BitVoicer if the Speech
  //Recognition Engine is running
  if (bvSerial.engineRunning)
  {
    //The value passed to the function is the time
    //(in microseconds) that the function has to wait before
    //performing the reading. It is used to achieve about
    //8000 readings per second.
    bvSerial.processAudio(46);
  }
}

//This function runs every time serial data is available
//in the serial buffer after a loop
void serialEvent()
{
  //Reads the serial buffer and stores the received data type
  dataType = bvSerial.getData();
 
  //Changes the value of sampleTest if the received data was
  //the start/stop sampling command
  if (dataType == BV_COMMAND)
      sampleTest = bvSerial.cmdData;
 
  //Signals BitVoicer's Speech Recognition Engine to start
  //listening to audio streams after the engineRunning status
  //was received
  if (dataType == BV_STATUS && bvSerial.engineRunning == true)
    bvSerial.startStopListening();
 
  //Checks if the data type is the same as the one in the
  //Voice Schema
  if (dataType == BV_STR)
    setLEDs();
}

//Performs the LED changes according to the value in
//bvSerial.strData
void setLEDs()
{
  if (bvSerial.strData == "wake")
  {
    digitalWrite(pinR, LOW);
    digitalWrite(pinY, LOW);
    digitalWrite(pinG, LOW);
    digitalWrite(pinR, HIGH);
    digitalWrite(pinY, HIGH);
    digitalWrite(pinG, HIGH);
    delay(200);
    digitalWrite(pinR, LOW);
    digitalWrite(pinY, LOW);
    digitalWrite(pinG, LOW);
    delay(200);
    digitalWrite(pinR, HIGH);
    digitalWrite(pinY, HIGH);
    digitalWrite(pinG, HIGH);
    delay(200);
    digitalWrite(pinR, LOW);
    digitalWrite(pinY, LOW);
    digitalWrite(pinG, LOW);
    delay(200);
    digitalWrite(pinR, HIGH);
    digitalWrite(pinY, HIGH);
    digitalWrite(pinG, HIGH);
    delay(200);
    digitalWrite(pinR, LOW);
    digitalWrite(pinY, LOW);
    digitalWrite(pinG, LOW);
    lightLevel = 0;
  }
  else if (bvSerial.strData == "sleep")
  {
    digitalWrite(pinR, LOW);
    digitalWrite(pinY, LOW);
    digitalWrite(pinG, LOW);
    digitalWrite(pinR, HIGH);
    digitalWrite(pinY, HIGH);
    digitalWrite(pinG, HIGH);
    delay(200);
    digitalWrite(pinR, LOW);
    digitalWrite(pinY, LOW);
    digitalWrite(pinG, LOW);
    delay(200);
    digitalWrite(pinR, HIGH);
    digitalWrite(pinY, HIGH);
    digitalWrite(pinG, HIGH);
    delay(200);
    digitalWrite(pinR, LOW);
    digitalWrite(pinY, LOW);
    digitalWrite(pinG, LOW);
    lightLevel = 0;
  }
  else if (bvSerial.strData == "RH")
  {
    digitalWrite(pinR, HIGH);
    lightLevel = 255;
  }
  else if (bvSerial.strData == "RL")
  {
    digitalWrite(pinR, LOW);
    lightLevel = 0;
  }
  else if (bvSerial.strData == "YH")
  {
    digitalWrite(pinY, HIGH);
    lightLevel = 255;
  }
  else if (bvSerial.strData == "YL")
  {
    digitalWrite(pinY, LOW);
    lightLevel = 0;
  }
  else if (bvSerial.strData == "GH")
  {
    digitalWrite(pinG, HIGH);
    lightLevel = 255;
  }
  else if (bvSerial.strData == "GL")
  {
    digitalWrite(pinG, LOW);
    lightLevel = 0;
  }
  else if (bvSerial.strData == "ALLON")
  {
    digitalWrite(pinR, HIGH);
    digitalWrite(pinY, HIGH);
    digitalWrite(pinG, HIGH);
    lightLevel = 255;
  }
  else if (bvSerial.strData == "ALLOFF")
  {
    digitalWrite(pinR, LOW);
    digitalWrite(pinY, LOW);
    digitalWrite(pinG, LOW);
    lightLevel = 0;
  }
  else if (bvSerial.strData == "brighter")
  {
    if (lightLevel < 255)
    {
      lightLevel += 85;
      analogWrite(pinR, lightLevel);
      analogWrite(pinY, lightLevel);
      analogWrite(pinG, lightLevel);
    }
  }
  else if (bvSerial.strData == "darker")
  {
    if (lightLevel > 0)
    {
      lightLevel -= 85;
      analogWrite(pinR, lightLevel);
      analogWrite(pinY, lightLevel);
      analogWrite(pinG, lightLevel);
    }
  }
  else
  {
    bvSerial.startStopListening();
    bvSerial.sendToBV("ERROR:" + bvSerial.strData);
    bvSerial.startStopListening();
  }
}


The BitVoicer Voice Schema I used can be downloaded from: http://www.justbuss.xpg.com.br/BitVoicerTest2.zip (you need to have BitVoicer installed to be able open it).

Now I want to control a few things (lights and celling fan) at home. Suggestions are very welcome.
<p>Does it run without being connected to a computer?</p>
<p>Can I only download BitVoicer on a windows computer, I can't download it on a Mac. Plus, is there a free version, or can I only download the one to pay?</p>
<p>I hooked up the circuit, downloaded everything and found out i had to pay to activate a 10 minute arduino project??? </p>
<p>Hi,</p><p> I'm going to use your bitvoice library along with an Arduino for my university project. </p><p>- I want use four microphones for voice recognition.</p><p>- Also need to identify from which microphone the specified voice was identified.</p><p> would bitvoice be able to help me with any method to achieve this task by using an Arduino? </p>
<p>Dear Sir,</p><p>What types of speech recognition method used here?</p><p>example:1.Statistical modeling and machine learning</p><p>2.Deep Speech: Accurate Speech Recognition with GPU-Accelerated Deep Learning</p><p>3.Signal processing dealing with noisy environments</p><p>4.Vocabulary size and diffluent speech</p><p>5.Speaker independent and adaptive speech recognition</p><p>6.Spoken language understanding and dialog</p><p>7.Finger print analysis method</p><p>Bcz I should take for Arduino uno for Engineering project.</p>
<p>yo me met&iacute; de lleno al proyecto que hizo investigue y y el micr&oacute;fono de arduino osea el micr&oacute;fono de tres lineas lo que hace es que amplificar la se&ntilde;al eso es lo que hace a diferencia de un micr&oacute;fono normal que solo tiene voltaje y tierra lo que yo hice fue sacar la se&ntilde;al del micr&oacute;fono de dos lineas y ampliarlo para obtener la linea de se&ntilde;al y conectarlo al pin anal&oacute;gico lo hice con 5 leds pero mi problema es que no enciende... seg&uacute;n mi tester cuando hago ruido en el micr&oacute;fono lo detecta le llegan 5v pero cuando abro el programa del bitvoicer pues me detecta las sentencias y reconoce lo que digo el c&oacute;digo tengo bueno pues me lo compilo pero el problema es que no hace nada... cuando digo por ejemplo &quot;wakeup&quot; el bitvoicer me lo reconoce y todo pero mi arduino no hace nada... no se en que me habr&eacute; equivocado... me urge que funcione no se en que me he equivocado?</p><p>me toca apagar el microfono que tiene mi laptop porque sino ese microfono me reconoce pero cuando digo las palabras reservadas no lo detecta... como que sino lo tuviera conectado pero el microfono esta bueno..</p><p>en la parte del microfono lo hice con una fuente externa usb para q traslade 5v el bitvoicer no me reconoce el microfono del circuito usted cual cree q sea mi error?</p><p>las resistencias que uso para los leds son de 330Ohmios</p><p>HELP ME!!!</p><p>&quot; I immersed myself in research project that made yy bone arduino microphone microphone three lines it does is amplify the signal that is what makes it unlike a normal microphone voltage and ground only has what I did was take the microphone signal and extend two lines for signal line and connect the analog pin did 5 leds but my problem is not light ... in my tester when I do noise in the microphone detects you arrive 5v but when I open the program bitvoicer because I detected judgments and recognize what I say the code got good because I do I build it but the problem is that it does nothing ... when I say for example &quot;wakeup&quot; the bitvoicer recognize me and everything but my Arduino does nothing ... not that I have been mistaken ... I urge you not to work when I go wrong?</p><p>I have to turn off the microphone that has my laptop because otherwise the microphone recognizes me but when I say the keywords does not detect it ... like that but it has connected but the microphone is good ..</p><p>on the part of the microphone did an external source to q transfer usb 5v bitvoicer not recognize me the microphone circuit which you believe q is my mistake? &quot;</p>
<p>yo me met&iacute; de lleno al proyecto que hizo investigue y y el micr&oacute;fono de arduino osea el micr&oacute;fono de tres lineas lo que hace es que amplificar la se&ntilde;al eso es lo que hace a diferencia de un micr&oacute;fono normal que solo tiene voltaje y tierra lo que yo hice fue sacar la se&ntilde;al del micr&oacute;fono de dos lineas y ampliarlo para obtener la linea de se&ntilde;al y conectarlo al pin anal&oacute;gico lo hice con 5 leds pero mi problema es que no enciende... seg&uacute;n mi tester cuando hago ruido en el micr&oacute;fono lo detecta le llegan 5v pero cuando abro el programa del bitvoicer pues me detecta las sentencias y reconoce lo que digo el c&oacute;digo tengo bueno pues me lo compilo pero el problema es que no hace nada... cuando digo por ejemplo &quot;wakeup&quot; el bitvoicer me lo reconoce y todo pero mi arduino no hace nada... no se en que me habr&eacute; equivocado... me urge que funcione no se en que me he equivocado?</p><p>me toca apagar el microfono que tiene mi laptop porque sino ese microfono me reconoce pero cuando digo las palabras reservadas no lo detecta... como que sino lo tuviera conectado pero el microfono esta bueno..</p><p>en la parte del microfono lo hice con una fuente externa usb para q traslade 5v el bitvoicer no me reconoce el microfono del circuito usted cual cree q sea mi error?</p><p>las resistencias que uso para los leds son de 330Ohmios</p><p>HELP ME!!!</p><p>&quot; I immersed myself in research project that made yy bone arduino microphone microphone three lines it does is amplify the signal that is what makes it unlike a normal microphone voltage and ground only has what I did was take the microphone signal and extend two lines for signal line and connect the analog pin did 5 leds but my problem is not light ... in my tester when I do noise in the microphone detects you arrive 5v but when I open the program bitvoicer because I detected judgments and recognize what I say the code got good because I do I build it but the problem is that it does nothing ... when I say for example &quot;wakeup&quot; the bitvoicer recognize me and everything but my Arduino does nothing ... not that I have been mistaken ... I urge you not to work when I go wrong?</p><p>I have to turn off the microphone that has my laptop because otherwise the microphone recognizes me but when I say the keywords does not detect it ... like that but it has connected but the microphone is good ..</p><p>on the part of the microphone did an external source to q transfer usb 5v bitvoicer not recognize me the microphone circuit which you believe q is my mistake? &quot;</p>
<p>yo me met&iacute; de lleno al proyecto que hizo investigue y y el micr&oacute;fono de arduino osea el micr&oacute;fono de tres lineas lo que hace es que amplificar la se&ntilde;al eso es lo que hace a diferencia de un micr&oacute;fono normal que solo tiene voltaje y tierra lo que yo hice fue sacar la se&ntilde;al del micr&oacute;fono de dos lineas y ampliarlo para obtener la linea de se&ntilde;al y conectarlo al pin anal&oacute;gico lo hice con 5 leds pero mi problema es que no enciende... seg&uacute;n mi tester cuando hago ruido en el micr&oacute;fono lo detecta le llegan 5v pero cuando abro el programa del bitvoicer pues me detecta las sentencias y reconoce lo que digo el c&oacute;digo tengo bueno pues me lo compilo pero el problema es que no hace nada... cuando digo por ejemplo &quot;wakeup&quot; el bitvoicer me lo reconoce y todo pero mi arduino no hace nada... no se en que me habr&eacute; equivocado... me urge que funcione no se en que me he equivocado?</p><p>me toca apagar el microfono que tiene mi laptop porque sino ese microfono me reconoce pero cuando digo las palabras reservadas no lo detecta... como que sino lo tuviera conectado pero el microfono esta bueno..</p><p>en la parte del microfono lo hice con una fuente externa usb para q traslade 5v el bitvoicer no me reconoce el microfono del circuito usted cual cree q sea mi error?</p><p>las resistencias que uso para los leds son de 330Ohmios</p><p>HELP ME!!!</p><p>&quot; I immersed myself in research project that made yy bone arduino microphone microphone three lines it does is amplify the signal that is what makes it unlike a normal microphone voltage and ground only has what I did was take the microphone signal and extend two lines for signal line and connect the analog pin did 5 leds but my problem is not light ... in my tester when I do noise in the microphone detects you arrive 5v but when I open the program bitvoicer because I detected judgments and recognize what I say the code got good because I do I build it but the problem is that it does nothing ... when I say for example &quot;wakeup&quot; the bitvoicer recognize me and everything but my Arduino does nothing ... not that I have been mistaken ... I urge you not to work when I go wrong?</p><p>I have to turn off the microphone that has my laptop because otherwise the microphone recognizes me but when I say the keywords does not detect it ... like that but it has connected but the microphone is good ..</p><p>on the part of the microphone did an external source to q transfer usb 5v bitvoicer not recognize me the microphone circuit which you believe q is my mistake? &quot;</p>
<p>Hello,</p><p>I connected and compiled the code on arduino Mega 2560 without any errors. I also activated BitVoicer and changed the preferences to match that of the connected Arduino. But when I click start in bitvoicer, i get this error &quot; Can not find the requested data item, such as data key or value&quot;. Also the activity info box on the right in bitVoicer shows &quot;Error: unable to load recognition feature&quot;</p><p>I would really appreciate any help.</p>
<p>I have no idea what that message means. I thing you should contact their support.</p>
<p>Hey can anyone give bit voicer activation key.....</p><p>Plzzzzzzzz</p><p>mailId: lingameswar5@gmail.com</p><p>sent to this mail if u need privacy plzzz help meee</p>
<p>Hi, this is really cool !</p><p>I coppied the BitVoicer11 folder to the Arduino Library folder and imported it.</p><p>Still, I get the following message in arduino:</p><blockquote><strong>sketch_mar02k.ino:1:25: fatal error: BitVoicer11.h: No such file or directory</strong></blockquote><blockquote><strong>compilation terminated.</strong></blockquote><p><strong>Error compiling.</strong><br></p><p>Any ideas how to solve? thanks in advance! Best wishes, Reza</p>
Just tried to compile the code on my post using the 1.6 IDE and it compiles perfectly.
<p>Hiii</p><p>It seems to a great Program. I want to ask you that Can we have free bitvoicer software. Which did not ask for activation key. Can we use any other free ware that can replace the bitvoicer. </p>
<p>how to build a design of an voice recognition in android?</p>
<p>Hi there, I have a question. I tried to do this project, yet I used different microphone (http://www.robotistan.com/Ses-Sensor-Karti-Mikrofon-Sensoru,PR-2121.html). It looks similar to yours. The problem is the microphone either doesn't receive any voices or receives all of the noise; according to potantiometer's setting. (I mean audio level is 0 or 97 in Bitvoicer). What am I doing wrong? Thank you for your interest.</p>
<p>I could not find the specs of your microphone, so I am not able to find out if it has something to do with the analog reference I used in this instructable. I also see that your mic has a potentiometer and it may be driving the analog output too high.</p>
<p>ardino IDE is showing the error in your code...</p><p>help me</p>
<p>You propably did not copy all the library files to the right folder. There are instructions on how to install Arduino libraries here http://arduino.cc/en/Guide/Libraries and on the BitVoicer manual.</p>
<p>bitvoicer problem</p>
<p>There is no problem with BitVoicer. This post has been read and used by thousands of users and no problem with BitVoicer has been reported.</p>
<p>You propably did not copy all the library files to the right folder. There are instructions on how to install Arduino libraries here http://arduino.cc/en/Guide/Libraries and on the BitVoicer manual.</p>
<p>please i want to use arduino can i make a robot wch recognisie the voice n by THAT voice only vil b the password for dat robot .that robot is for only storing d data n keeping voice as a password for security?</p>
<p>Well, I'm sure there are solutions for voice identification out there, but right now I think BitVoicer only does speech recognition.</p>
<p>please i want to ask you if i can do something like number recognition on arduino by a camera ? and another question if i can program the camera on number recognition on matlab then i attached it in arduino ?</p>
<p>I am sorry, but I really didn't understand your question. What do you mean by &quot;recognition on arduino by a camera&quot;? Are you talking about image recognition? If so, then I'm sorry but I do not know anything about it.</p>
<p>Really nice and easy to understand quick guide, but a question, do you need bitvoicer running on a PC always to make the voice recog. work ? How about for a wireless device which you want to be independent from a PC, considering the case you want to control a device (like a mobile) with VR or send your voice to the device</p>
<p>Please read the answers bellow that you will find the answers to all of your questions.</p>
<p>Does this schematic need Arduino connected to Windows all the time, or it's just for setup? I could not really understand this part.</p>
<p>Microcontrollers simply do not have the processing power to perform speech recognition like this, so your Arduino will need a logical connection to the PC all the time.</p>
<p>Not all, that's true. I'm exploring Arduino DUE's possibilities, as it's 84 MHz, 32-bit and have plenty of memory available ...</p><p>Otherwise - this whole instructable is not very helpful, if you need your microcontroller _connected_ to a _windows_ machine all the time.<br><br>Thanks for clarifying this, almost bought BitVoicer.</p>
<p>Well, BitVoicer uses almost 5% of my quad core 2.5GHz processor and the English language database has about 23MB. Even the DUE would take forever to process the audio and search a database this big. Besides, BitVoicer is speaker independent and you can create an unlimited number of sentence variations. I have already tried some devices with simple, inaccurate and speaker dependent speech recognition. They don't even get close to the BitVoicer performance.</p>
<p>hi, it's very good tutorial I've tried it and succes. But I wanna ask, is the bitVoicer can recognize sentences with unlimited number, like I wanna give command 'turn all lamps on without the red ones'. So, all lamps turn on without the red one. can I? if yes, how to do that?</p>
<p>hi, it's very good tutorial I've tried it and succes. But I wanna ask, is the bitVoicer can recognize sentences with unlimited number, like I wanna give command 'turn all lamps on without the red ones'. So, all lamps turn on without the red one. can I? if yes, how to do that?</p>
<p>hi, it's very good tutorial I've tried it and succes. But I wanna ask, is the bitVoicer can recognize sentences with unlimited number, like I wanna give command 'turn all lamps on without the red ones'. So, all lamps turn on without the red one. can I? if yes, how to do that?</p>
<p>hi, it's very good tutorial I've tried it and succes. But I wanna ask, is the bitVoicer can recognize sentences with unlimited number, like I wanna give command 'turn all lamps on without the red ones'. So, all lamps turn on without the red one. can I? if yes, how to do that?</p>
<p>my goal is a bit different, but thank you for clarifying. </p>
<p>I forgot to mention something that may help you. I added WiFi conectivity to this project. Here is the Instructable on how to implement a RN171XV module (Microchip: http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en560635) in this project: http://www.instructables.com/id/Wireless-Audio-Streaming-and-Speech-Recognition/</p>
<p>hye I have a question...did you change the setting in the bitvoicer?....</p><p>I have bought all the equipment needed but it seem my microphone does not work...</p><p>need ur help ASAP....tQ</p>
<p>Well, I had to set up the communication settings in the preferences.</p>
<p>bitvoicer11.h missing </p><p>plz give this code </p>
You can find the library inside the BitVoicer installation folder.
<p>really great job!but we are having defficulties in having product key for bitvoicer..<br>can anyone send me ur own product key?it would really help us a lot ..</p><p>by da way name is benedict,from philippines!Godbless!</p>
<p>A product key can be activated on one computer only. It will not work on another computer if it has already been activated.</p>
<p>hi leandro i downloaded bitvoicer i did the same project i bought the microphone and it seems no to work for me i'm using the same resistors and electret microphone the testing bitvoicer program and the leds doesn't turn on the only difference is that i am using arduino due for the same project , my question is how does the bitvoicer connects with arduino and how the microphone of my pc have something to do with the microphone of the project please help</p>
<p>hi leandro i downloaded bitvoicer i did the same project i bought the microphone and it seems no to work for me i'm using the same resistors and electret microphone the testing bitvoicer program and the leds doesn't turn on the only difference is that i am using arduino due for the same project , my question is how does the bitvoicer connects with arduino and how the microphone of my pc have something to do with the microphone of the project please help</p>
<p>I am not sure, but I think their Arduino library does not work with the Duo board. You will have to make some changes to the library or find someone who has.</p>
<p>Well, your computer's microphone really has nothing to do with the microphone you use in your project. I suggest you take a good look into their manual to find out how BitVoicer connects with your Arduino. I also know that their library was not designed to work with the Arduino Due, so you will have to rewrite the library for the Due.</p>
<p>Hi!!! We are trying to use the speech recognition feature for a project, we bought the program, the microphone, and we connect everything but it seems not to work... What resistors are you using?? We are also using a sensor shield.. but we are connecting it to A0, just like yours.. If you can help us it will be awesome!!! PS: we are using your BitVoicer program and your arduino code</p>
<p>I used 330 ohm resistors for the LEDs. Is the calibration tool showing any readings?</p>