10 years, 6 months ago.

Voice recognition using Mbed

Hi

I want to use mbed to recognize voice. Actually i want to create a set-up using a simple microphone based circuit to detect human voice inside a room/place. I don't have to do anything fancy like word matching etc i just want to differentiate between a human voice and noise in the surrounding if any...

If anyone can help me in this regard. I don't have to use any fancy voice recognition system just the old microphone circuit.

Anyone??

2 Answers

10 years, 6 months ago.

use Easyvr with mbed

following this link http://mbed.org/users/4180_1/notebook/easyvr/

Accepted Answer
10 years, 6 months ago.

You could use a mems microphone like this: https://www.sparkfun.com/products/9868

I've used this with the mbed before, but only to detect if people were in a room or not in a room, and for that purpose it worked quite well.

Thanks for your reply ashley Do you have any code for that ? any library that you used ? with the mbed or what procedure you actually followed ?

posted by Syed Aftab 08 Oct 2013

The code is very simple, just connect the microphone up like this:

  • VCC -> mbed VOUT (3.3v)
  • GND -> mbed GND
  • AUD -> mbed analog pin (for example p16)

Then just use something like this to sample the analog signal:

#include "mbed.h"

int main() {

    AnalogIn mic(p16);
    Serial pc(USBTX,USBRX);
    pc.baud(115200);
    pc.printf("Reset\r\n\r\n");
    float amp, maxAmp = 0, minAmp = 1;
    while(1) {
       amp = mic.read();
       if(amp>maxAmp)
          maxAmp = amp;
       if(amp<minAmp)
          minAmp = amp;
          
       pc.printf("%f %f %f\r",amp,minAmp,maxAmp);
    }
}

The microphone output floats at 0.5V when no sound is picked up. The NXP1768 ADC measures between -3.3V and 3.3V so I'm assuming the mbed's float output would be based at 0.075V in the case of no output from the microphone. But this is something you would have to check.

I'd be interested to know the level of sensitivity you can actually get with this microphone. According to the NXP1768 spec sheet the 16bit ADC conversion rate is 200khz so you should in theory be able to do some interesting things.

posted by Ashley Mills 09 Oct 2013

Thank You Ashley

The problem is in my country it is difficult to find part like ADMP401 and i do not have enough time to order it because the shipment takes a lot of time. Can i do this using the basic analog Microphone. The two wire microhphone.

posted by Syed Aftab 10 Oct 2013