LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Audio Event Detection

At approximately the 12.5 second point in the attached file there is a change in the pitch.  I have been trying several methods of detecting that change programmatically to no avail.  Does anyone have a suggestion?

0 Kudos
Message 1 of 10
(2,056 Views)

@JimFX wrote:

At approximately the 12.5 second point in the attached file there is a change in the pitch.  I have been trying several methods of detecting that change programmatically to no avail.  Does anyone have a suggestion?


I do have a suggestion:

Upload the VI with the code that you tried so we can help you fix it.  Also, what "several methods" have you tried?

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 10
(2,026 Views)

As a human, it is easy for you to say there is a change in pitch but by how much is a personal preference. In order to implement an algorithm, you have to quantize any qualitative definition.

 

Pitch in sound is nothing but the frequency, LV comes with multiple signal analysis VIs that helps to measure the frequency of a signal.

 

I would suggest the below pseudo-code

  1. Read the full sound waveform
  2. Chop the waveforms into smaller chunks to measure the frequency
  3. You will get an array of frequency for a series of time intervals
  4. Compare consecutive elements in the frequency array, if the change is above a certain value, note that element as the location of change

This could become complex as how you would define the change is - whether relative or absolute, for example, 10% increase in frequency or 1kHz increase

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 3 of 10
(2,018 Views)

I have been mainly working with example programs like the Demonstration of Analysis VIs(Simulated).vi.  I am trying to replicate the Zoom FFT portion of that VI, but I can't locate some of the sub VIs used.  A couple of the VIs have icons that, like the one below, feature an EX in the upper left corner.  I cannot find any sub VIs with this group identifier in the Sound and Vibration palette.  It has the same color scheme as the majority of the S&V icons.  Anyone know where I might find them?

 

JimFX_0-1628187315612.png

 

0 Kudos
Message 4 of 10
(1,985 Views)

'Ex' means that it is an example subVI. It can be found in <LabVIEW>\vi.lib\addons\Sound and Vibration\Example Support

If you take any code from those example helper subVIs, save it to a new subVI that you own. Those helper VIs are not part of the SV API and NI could modify them or not include them in future versions.

 

That said, I recommend that you investigate the example VIs found in <LabVIEW>\examples\Sound and Vibration\Transient Analysis which demonstrate use of Short-Time Fourier Transform (STFT) which santo_13 described in his previous post.

Doug
NI Sound and Vibration
0 Kudos
Message 5 of 10
(1,916 Views)

Btw, with any example VI, you can open the VI by double clicking on the subVI icon in the example block diagram. View the VI Properties where the General category shows the Location on disk.

Doug
NI Sound and Vibration
0 Kudos
Message 6 of 10
(1,914 Views)

Just by listening, the sound is mostly white noise (containing all frequencies) and at the 12.5 second point we get mostly a drop in volume, possibly more pronounced at higher frequencies, but that's hard to tell with my old ears and cheap laptop speakers.. 😄

 

Do you have access to the advanced signal processing toolkit? One example would be JTFA analysis.

 

Still, even without that, you should be able to do something simple without using the toolkit. You already got some good suggestions.

 

 

0 Kudos
Message 7 of 10
(1,858 Views)

@altenbach wrote:

Just by listening, the sound is mostly white noise...


Upon further inspections, there seem to be a relatively small set of frequencies (~0.5kHz, ~1kHz, 2kHz, 3.5kHz and 5.5kHz, if I did the math right 😉 ) None really change in pitch but the amplitude of the 5.5kHz component only appears with significant amplitude at around 12.5s. If this is a known frequency, you could just graph it's amplitude vs time and look for the point here its amplitude exceeds a given threshold.

 

What's the experiment? Where does the data come from and what does it mean? What exactly do you want as result?

0 Kudos
Message 8 of 10
(1,853 Views)

Thanks for the responses.  This sound is a fire extinguisher.  One of the tests that we must perform is to measure how long it takes for the extinguisher agent to be expelled from the extinguisher.  At that point it is only the propellant coming out and this is called the gas point.  Currently this measurement is made with a stopwatch.  Given that the specs are typically +/- 1s, the response time of a person becomes significant.  Unfortunately the sound profile from unit to unit varies significantly.  Currently I am looking at the 10KHz region as this is an area that seems to consistently see a sudden jump in amplitude at the gas point.

0 Kudos
Message 9 of 10
(1,760 Views)

Is there a way to sample the background noise and use that as a "template" to filter it from the audio?

0 Kudos
Message 10 of 10
(1,596 Views)