LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to save the data as .wav file taken from DAQ card

Helloo every one,

i m working on a project in which i am using daq card . i was able to save the data in text fornmat and binary but i  dont how to save data taken  frm the daq card as .wav file. can some one help me out

 

   Regards zohaib

0 Kudos
Message 1 of 22
(3,819 Views)

Hi Zohaib,

 

If you look under the programming tab for graphics and sound there are an number of blocks for handling .wav files. You can supply a waveform direct into one of these and it will create a .wav file for you.

 

Paul

Regards

Paul

CLD running LabVIEW 2012 32 & 64 bit on Windows 7 64 bit OS.
Message 2 of 22
(3,816 Views)

 hi paul

         Thanx paul for ur reply. i hve been  following the same procedure early  as well  but  when i play the saved  file or  play direct frm the out of daq  ,  i listen a beep like ouput but not the actual input which i hve given to the daq card.i want to ask another question  if a give .wav file as a input to daq card the output of the daq card is the same as .wav file or different.?

       zohaib

0 Kudos
Message 3 of 22
(3,810 Views)

Why a wav file? Do you plan to play your data om some media player afterwards? That can be done. But you have to select your sample rate with care. I suggest you tell us more about what you are doing. And perhaps post some code. But please post your code not some screen dumps



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 4 of 22
(3,808 Views)

It does sound like your sample rate is set incorrectly - beeps or clicks from the sound card are common in this case. If you're reconstructing a waveform from your DAQ data to send to a .wav then you need to make sure the dT element is correct. The maximum is 44.1kHz if I remember correctly, although lower will work. You can resample acquired data to a different sample rate, but it's far better to capture it at the correct rate in the first place (and have appropriate analgue filtering on the input to the DAQ).

 

Paul

 

 

Regards

Paul

CLD running LabVIEW 2012 32 & 64 bit on Windows 7 64 bit OS.
0 Kudos
Message 5 of 22
(3,807 Views)

actually i hve to design  a voice logging system using  DAQ card which can logg voice and if user want to play the logged data  they can play it. i hve to take voice input from 24 different channels simultaneously, write now i m working  with one channel then i will apply the same logic to other channels sa well, i think i dont need to construct a waveform..i dont hve a code that could be helpful to u i hve  just started this project ,

 

               zohaib

0 Kudos
Message 6 of 22
(3,766 Views)

when the user plays the logged data, how are you planning on playing the audio stream? Are you going to play it on a software program, such as windows media player, or do you need to output the raw analog signal directly to a speaker system?

National Instruments
Applications Engineer
0 Kudos
Message 7 of 22
(3,743 Views)

there is a block in the labview to play the .wav file i hve planned to  play the file from that block 

       zohaib

0 Kudos
Message 8 of 22
(3,692 Views)

It has been a trend now that sound card only support  some samplerates rather than a range. But every sound card do support 44100 Hz as sample rate and in most cases also 22050 Hz. So you must adjust the sample rate. On the DAQ card. To a sample rate that is supported by your sound card



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Message 9 of 22
(3,685 Views)

now i was able to listen the audio signal through daq but it stops automatically given an error . i m taken continous data, it takes certain amount of samples and then stops i hve vary the samples to read which act as buffers size in continous still the problem not resolved how to overcome this problem

    zohaib

0 Kudos
Message 10 of 22
(3,638 Views)