Page 1 of 1

RasPi 3 Audio line monitoring? Is it possible?

Posted: Wed Feb 14, 2018 7:57 pm
by CH_Skywatch
So here's my question, complete noob here at the RPI.
Is it possible with a microphone or 3.5 mm input to monitor audio and do an action (eg control a servo or blink a Hue light) when it hears a sound that matches a prerecorded sound? How would one go about doing this, and what sort of software and code would be needed?

Re: RasPi 3 Audio line monitoring? Is it possible?

Posted: Thu Feb 15, 2018 3:53 pm
by fruitoftheloom
CH_Skywatch wrote:
Wed Feb 14, 2018 7:57 pm
So here's my question, complete noob here at the RPI.
Is it possible with a microphone or 3.5 mm input to monitor audio and do an action (eg control a servo or blink a Hue light) when it hears a sound that matches a prerecorded sound? How would one go about doing this, and what sort of software and code would be needed?

The Raspberry Pi has no Audio Input !!

Re: RasPi 3 Audio line monitoring? Is it possible?

Posted: Thu Feb 15, 2018 4:18 pm
by mpdoran
It should be possible with the right hardware.

I am doing a project now using an Audio Injector sound card to light LEDs based on the audio spectrum from the mic input. There are several tutorials out there for this kind of project.

To respond to a prerecorded sound, you'd need to take this a step further. You can use your prerecorded sound to create a matched filter. Run the mic feed through the matched filter, and you can use the filter output to trigger whatever action you want. This requires some knowledge of digital signal processing, or there may be libraries out there that already do this kind of thing. This could be done in just about any language. I'm using python for my project.

I'm considering working some of this into my project eventually too. Obviously haven't started this part yet, otherwise I'd have something more solid to help you with... But bottomline: I think it is possible!