Society of Robots - Robot Forum

Electronics => Electronics => Topic started by: ansh on April 24, 2012, 11:29:22 PM

Title: voice activated circuit
Post by: ansh on April 24, 2012, 11:29:22 PM
Hi
i want to make voice activated circuit. it will turn on when i speak on. i need some idea
example
 microphone + sensor + pre amp + filter +   LED
                        on/off
when i speak ON sensor is on otherwise sensor is off
i am searching this type of sensor. if anyone know about this sensor please suggest me
Title: Re: voice activated circuit
Post by: newInRobotics on April 25, 2012, 01:07:30 AM
Microphone IS Your sound sensor, it senses vibrations in air (AKA sound) and outputs proportional voltage. Now You need to capture that voltage and decide what to do with it. I would feed signal into ADC port of microcontroller, set threshold voltage level in software and plug LED to one of it's output pins.
Title: Re: voice activated circuit
Post by: Soeren on April 26, 2012, 09:13:56 PM
Hi,

i want to make voice activated circuit. it will turn on when i speak on. i need some idea
example
 microphone + sensor + pre amp + filter +   LED
                        on/off
when i speak ON sensor is on otherwise sensor is off
i am searching this type of sensor. if anyone know about this sensor please suggest me
Assuming that you want it to respond to a spoken "ON" and not responding to any other words, whether they be "OFF", "BANANA" or "TON", you cannot do it with analog filtering alone, but need some kind of DSP (chips exists for this purpose, or hack a cell phone that takes spoken commands, like most Nokias, eg. the 33x0 series).
(Not that the speech interface of cell phones are all that precise).

If you lax the demand to "any sound of the approximate same length and main frequency composition", one or more filters could be used, but you'd have to FFT-analyze a lot of samples of the word, preferably sampled  (eg. to a recorder) over a couple of days, as your pronounciation will shift some.

When you have the FFT results, calculate mean frequencies and the needed bandwidth (BW) of each filter (go for at least 3 filters or don't bother at all).
The BW of each will decide how much non-"ON" will set it off and the wider each filter, the less precise - sharp pulse noise (like slamming a ruler hard on a table) will probably go through any filter and set it off, unless you use a lot of very steep filters (like at least 25..30dB/oct) and having some logic determine if the output timing from each is OK.

Differentiating words "TON", "SON", "SUN", "DONE" etc. is impossible with filtering alone, as you'd need logic (and more filters to reject words with out-of-band components) to get anywhere near a decent percentage of false rejections.

"TON" only differs in the initial unvoiced "t" sound (which resides around 5..6kHz. IOW, if you filter through eg. a 2kHz LP filter, you have absolutely no way of differentiating the two words "ON" and "TON".
Same thing with "SON", just the "sss" sound is higher in frequency than the "t".
Similar effects with similar sounds, just with different frequencies and timing, but this is not supposed to be a tutorial  :)

A hacked phone or a dedicated speech recognition chip is probably your best bet for something semi-usable - or use a speech recognition program on your PC and let the output control the LED (or a graphical representation of an LED). They should be close to 99% recognition.