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: 

how to save data as *.wav file

Hello,

 

I have NI DAQ 6229BNC. I want to record sound data  (using a microphone and amplifier). Please see the attached application I made. I acquire the sound data as voltage using DAQ, then convert it to a waveform. Then I try to save this waveform as *.wav file. The application creates empty '*.wav' file with no data in it. Please help me with this.

 

thanks you

 

0 Kudos
Message 1 of 8
(4,703 Views)

Works just fine for me. The only thing I did was to change the browse options of your path control so I could select a new file before running it the first time.

0 Kudos
Message 2 of 8
(4,694 Views)

I dont know, but it is still giving me the problem. It creates the file but of '0' bytes, an empty *.wav file.

And how did u change the browse option of the file?

I doubt but do u think it can be the problem?

 

I am a newbie to the LabView. jst started learning.....and this small prob is making me go crazy.... pls sm one give me the solution...or at-least tell me where I am making mistake.....

 

0 Kudos
Message 3 of 8
(4,688 Views)

Right click on the browse button. Select Browse Options.

0 Kudos
Message 4 of 8
(4,678 Views)

Hi Vinayak,

 

I've also tested out your file and it seams to work fine and creates a 2KB .wav file. Have you double checked to see if you have DirectX 8.0 or later? You can check this by going to your start menu in Windows and clicking Run...  then in the Run dialog box type dxdiag. This should pull up info on your system, one of the stats should be DirectX version.

 

To run Sound File Write Simple.vi you need DirectX 8.0 or later. 

 

How are you checking the size of your file?

 

Also, one thing I noticed while looking at your code: You convert an array to a dynamic data type and then back to an array, you can simply just wire the array strait to the Y of the Build Waveform. 

 

<Brian Aswege | Applications Engineering | National Instruments> 

 

0 Kudos
Message 5 of 8
(4,641 Views)

Thanks Baswege,

 

I am using windows 7 and my DirectX version is 11. But still code does not work.

 

 

Anyway I changed my code and not it seems to be working. Instead of using Sound File Write Simple.vi  now I use Sound File write.vi.

 

 

0 Kudos
Message 6 of 8
(4,630 Views)

Can you hear a sound when you replay the saved wav. file?

I hear nothing, but inly some noise.

 

Thanks

0 Kudos
Message 7 of 8
(3,780 Views)

thank you it help me

0 Kudos
Message 8 of 8
(3,668 Views)