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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquire audio signal

Solved!
Go to solution

Hello,

 

I am trying to read a voice signal and save it in an audio format. To accomplish this, I use an electret microphone, the LM358A to amplify the signal and the oscilloscope Hantek 6022BE to acquire the signal. I am using the LabVIEW 2018. I start from an example provided by Hantek that I upload here as LabVIEW_Original.vi.

 

After that, I just build a waveform with the VI Build Waveform and resample it with VI Resample Waveform. With the output, I play it with VI Play Waveform and create a .wav audio file with VI Sound File Write Simple. I attach the VI as LabVIEW_v2.vi.

 

My problem is that the sound quality of Play Waveform is much superior to the audio file created by Sound File Write Simple and I would like to know why and how to improve it. I attach the sound generated by Play Waveform as PlayWaveform.3gpp and the .wav file generated by the Sound File Write Simple as SoundFileWriteSimple.wav. The first one I had to record with my phone to share with you so you could understand the difference between both audios.

 

The audio files were zipped together with the library HTMarch.dll that allows communication with the oscilloscope Hantek 6022BE.

 

Best regards

0 Kudos
Message 1 of 2
(2,672 Views)
Solution
Accepted by topic author sobral

Problem solved, I should have read the Help about the VI Sound File Write Simple. So the sound data range from -1 to 1 and I was using the data directly from the oscilloscope, I just had to scale it.

Message 2 of 2
(2,639 Views)