From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Dynamic Signal Acquisition

cancel
Showing results for 
Search instead for 
Did you mean: 

Audio file acquisition and comparison.

I want to test the mic and speaker of a device.  My goal is to record the audio from a speaker with a mic and compare to a known good file.  Then do the reverse by playing an audio file and recording it with the devices built in mic and comparing it as well to a known good file.

 

My question is what software or toolkit has anyone used to accomplish something like this?  I have started looking at the NI Sound and Vibration 2018 Toolkit and the USB-4431. It has an extensive list of options but having a problem trying to solve my problem.  Is there something in the vanilla Labview 2018 I can use or any other option someone could suggest?

 

Thanks,

0 Kudos
Message 1 of 4
(4,531 Views)

What part of the application is not yet solved?

  1. Calculating a test signal
  2. Generating the test signal on the 4431 analog output and/or connections to your device
  3. Acquiring an acoustic signal using microphone connected to 4431 analog input
  4. Writing to audio file
  5. Reading from audio file
  6. Measurement/comparison of signals

Please refer to the following Sound and Vibration Toolkit examples:

Demonstration of Analysis VIs (Simulated).vi <-- shows how to read data from and analyze audio files

Write Waveforms (DAQmx to WAV File).vi <-- shows how to acquire a signal and write data to an audio file

One Shot Single Tone (DAQmx).vi <-- shows how to generate a test signal, acquire a response, and measure tone characteristics such as frequency, amplitude, gain, THD, THDN, etc.

Doug
NI Sound and Vibration
Message 2 of 4
(4,518 Views)

Hi,

I am able to acquire signal from microphone or direct electrical audio signals using PXIe-4498.

Main aim to play tone(s)from source maybe like audio player and compare the acquired tone(s) to original file.

Need help in comparing the original tones and acquired tone. As understood The power spectrum based of input like through microphone or directly signal connections is varying including noise situations, need some help how to achieve comparisons of tones. Attached is the example tone power spectrum. when plotted frequency spectrum, not much difference. Any help much appreciated. 

TIA. 

0 Kudos
Message 3 of 4
(4,292 Views)

I suggest using Extract Single Tone Information VI and/or Extract Multiple Tone Information VI. These VIs enable you to identify tone information that is difficult to discern from cursors on the power spectrum.

 

If you are interested in harmonic distortion, use the Harmonic Distortion Analyzer VI which generally expects a single-tone stimulus.

 

If you are interested in noise performance, you might try looking at the total energy in the noise by aggregating and comparing energy in the power spectrum from different frequency bands.

 

As for your attached data; the difference in the spectra is zero indicating these power spectra were computed from the same time waveform (not even different acquired channels of the same analog waveform). 

Doug
NI Sound and Vibration
0 Kudos
Message 4 of 4
(4,288 Views)