04-02-2014 12:13 PM
Hello, I am currently doing a project pertaining to alerting people that a police, ambulance, or firetruck is incoming through a visual screen. This is particularly for people who are hard of hearing and deaf. To do that, I was going to compare the recorded noise to a saved file that has a similar noise. For example, I compare the recorded noise of a police car and the noise of a saved file of a police car to create a condition to determine if the sounds are similar/congruent or if the sounds are not alike. If they are congruent, then the VI shows an indication to announce that an emergency car vehicle is coming by showing a message that can reset the loop by pressing the OK button (although I may change this). The problem is that I am trying to compare the saved sound file with the recorded sound file to create the previously stated condition. I have tried a few nodes and VI's to do this but I had no luck. I heard that you can square the data of the different sounds to compare them in energy form (or something like that) but I do not know how to do that. Also, take note that the way I set up the condition may be wrong on the part that has the Display to user VI but clarification on how to tweak that would be helpful. I attached the VI so you can hopefully point out any errors and give suggestions. Thanks for any time and effort.
04-02-2014 12:31 PM - edited 04-02-2014 12:32 PM
If I were doing this project, my first try would be to take a Fourier Transform of recorded sound and the received sound. Get the magnitude of the Fourier Transform of each, normalize them, and perform a correlation on the two. Normalizing them will help with differences in intensity between the pre-recorded and the new signal. Going into the frequency domain will help with differences in pitch (i.e. Doppler Effect).
04-02-2014 02:47 PM
There are many different kinds of sirens and the sounds they make have different time domain and frequency domain representations. To start I suggest that you select just one siren type and work on that . If you succeed with that, then try to generalize to other types.
One common type of electronic siren uses a frequency modulated square wave.The frequency ranges from several hundred hertz to 2-3 kHz. The mode called "Wail" on some sirens modulates that frequency in an approximately sinusoidal manner over a period of several seconds. Because this sound is easily simulated, I suggest that it might be a good starting place.
Lynn
04-03-2014 03:24 PM
Have a look at the spectrograms
Downsizing a a spectrogram (peak area) to 8x16 bit and find the best match?
04-07-2014 09:06 AM
Thanks for the suggestions, I will try to use this info to hopefully make production. I will update on my progress if I run into another problem.