Grove - Sound Sensor: Detection of Ambulance Siren

Hi, I’m currently working on a traffic light project. I’m quite a newbie and this is my first time using raspberry pi 4 and Grove products. I have bought a Grove - Sound Sensor from Cytron and was planning to use it to detect ambulance siren in my project. However, at the coding part, I couldn’t combine machine learning together with this Grove - Sound Sensor.

I’ve connected the Grove Sound Sensor to the HAT already.

May I know are there any codes for Detection of Ambulance Siren using Grove - Sound Sensor? I have searched online for days but couldn’t find any.

Thank you for the help!

3 Likes

Your searches related to the “Grove Hat” appears to have brought you to this unrelated “GrovePi Forum”.

While there have been a few people that attempted to use the Grove Sound Sensor, none have reported their success, nor posted any code.

While I have no experience with that sound sensor, I would guess that you would be better served by hooking a simple USB microphone directly to your Raspberry Pi, and investigate topics of Fast Fourier Transform and spectrograms to allow the processor to detect how the frequency of sound varies with time.

Wishing you good luck and success.

2 Likes

Since both the hat and the sensor are Seeed Studio products, you might be better served by looking on Seeed Studio’s forums and help.

Unfortunately, my own experience with Seeed Studio’s help, etc., has been less than stellar so this may not be good.

Likewise, if you do continue to work with the sensor, you may wish to get it working at a basic level first, and then use the ideas that @cyclicalobsessive suggested and try researching Fast Fourier Transforms and such to find out what you need to know.  Though frankly, I think the idea of a USB mic is a better idea, why fuss with a bunch of interfaces when you can go right to the source?

2 Likes

I see, thank you so much for the answers! @cyclicalobsessive @jimrh Is this mini USB microphone okay to use? Do I need to buy a sound card too or the microphone itself is sufficient?

link to product: Mini USB Microphone

2 Likes

I have one of those mics. It works. The sensitivity is Ok for recognizing speech in a quiet environment, so I expect it will be able to record a loud siren.

You do not need any sound card to use that mic. It will plug into one of the Raspberry Pi’s USB ports.

A hurdle you will need to cross is configuring the operating system to use the USB audio as the default capture device.

Post your Raspberry Pi related questions at forums.raspberrypi.com

2 Likes