gritz wrote: ski522 wrote:
BobCochran wrote:Does the PCM 2704 device featured in this thread do microphone input? If not, what is a good microphone for such a project? The mic has to capture speech from as far away as 10-15 feet.
The PCM 2704 card does not have a mic input. The initial "el-cheapo" card I first used did have a mic input, but I never tested it. You may want to get a cheap USB sound card (like the one I first posted) just to experiment. Picking up sound from 10-15 feet away will come down to how good of a microphone you are using and not so much the sound card itself.
Depending on the environment a lot of what any microphone picks up at that distance will be echoes, which I imagine would give any speech recognition algo a hard time. It's a big ask and I don't know what your application is exactly, but you're going to need to cut down that distance (and if possible treat or screen the immediate area to cut down on reflections) to increase the chances of success.
It's probably best to start small - have a dig around on the forum to see if anyone's had success with one of those little USB audio interfaces with a headphone out and a mic socket. Then you can use a Skype / VOIP headset, just to get the software up and running (I think there's a few threads referring to Skype hereabouts). Then maybe graduate to a directional camcorder mic. You may eventually find that you need a more "professional" shotgun type microphone and with it a better audio interface with a "proper" XLR socket, but that's a way down the development road yet.
You'll need some eq (tone controls!) to accentuate the frequencies present in the human voice and to cut down the chaff around it - and some dynamic range control too (compression - like automatic gain control, but a bit more scientific - and gating to cut out background noise below a certain level). Finally, it may be worth researching echo cancellation software - it's used a lot in telecoms and hearing aid tech. There may even be some source code hanging about somewhere. Come to think of it, hearing aid research may be a good place to start for a lot of pertinent info.
Or perhaps you could "bring the mountain to Mohammed" somehow - wireless microphone, etc?
It's a bold project Bob, so happy hunting!
Thank you very much for your feedback -- and thank you, Ski522 and others. I want to be able to control my TV and DVD player through speech recognition. I want to voice instructions to the Pi, and have it send the correct remote codes for the desired action. For example suppose I want to turn the TV on. I want to be able to say:
"Turn the TV on"
"Turn on the TV"
"Turn on the television"
and have the Pi respond to any of these with exactly one action: it transmits the correct infrared code for turning on the TV to the TV's infrared receiver. I want the Pi to act on my voice only. If my nephew asks me "Can I turn the TV on" I don't want the Pi to act on his voice. If my neighbor's dog starts barking, I don't want the barking to turn the TV on, either. (Smile.)
I'm going to poke around in the Forums as suggested and see what microphones others are using, but I am thinking based on feedback in this thread that the "Plantronics .Audio 655 USB Multimedia Headset" might be a good start, because this is essentially a "Skype" headset and two others in this thread suggested it. I also appreciate the advice to start small and work my way up. That is my plan.
Jon McPhalen, who writes the SpinZone column for Nuts and Volts magazine, pointed me to an article he wrote and the Propeller code needed to read the codes from my remote. I've breadboarded the circuit needed and gotten it to read my TV remote. A good but very small first step!
There is an excellent article in the current issue of The MagPi which discusses extracting codes from remotes as well. Soon I would like the Pi to read infrared and radio codes as well, but the speech recognition goal needs to be achieved first and foremost.
I hope that with patience, speech recognition can be achieved with a reasonable ratio of "successes" to "failures". I don't need to have 95% accuracy. It would be nice if it the success rate gets that high, but I'm not expecting it.