Showing results for 
Search instead for 
Did you mean: 

Read large wav files

I have some wav files that i want to generate waveforms for. The files are rather large (1GB-25GB). 

I was thinking about having labview reading them in small chunks of about 100mb each and then plotting the data to the end of a waveform graph.


If anyone has got around the memory limit or can show an example of splitting a wav file into chunks, i would like to see.


Message 1 of 10

Hi Ace,


what do you want to achieve?

Do you want to display a 25GB waveform in a graph???


- What is your LabVIEW version and what is your OS? (32bit or 64bit)

- What is the datatype of your "waveform" files?


Best regards,

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 2 of 10

I am trying to display a full .wav file in a waveform graph (or chart).


32bit os (4GB RAM), Labview 14.0f1.


Created the wave file using python wave modual. and saved as a standard .wav file.

0 Kudos
Message 3 of 10

Hi Ace,


in a 32bit environment you can only use upto 2GB of RAM (most times even much less).

This will limit the number of samples you can store in a waveform.


Additionally a graph also creates a databuffer (for display) - using atleast the same amount of memory as your waveform…


And don't forget: it doesn't make sensoe to display thousands of samples in a graph with <= 1000 pixels width. You need to decimate your data!

Best regards,

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 4 of 10

yea thats what i was looking into doing, basically if i can spilt it up i can then import the data into the graph in real time.


I saw an example of this running a waveform generator to create noise. I used this example of streaming audio from a mic into labview which gives the result im looking for.


If i can stream the audio in rather then generate the whole graph in one go it would be a lot easier for me to process my data.

Unfortunately at the moment its not possible for me to stream the sound directly from the mic I'm using as that's being processed by a raspberry pi.


I would like to generate a graph 1 second long with the raw waveform, then clear the graph and repeat until the end of the file.


picture shows the example however I cant find the original post on the forums.

0 Kudos
Message 5 of 10

You can use the sound files VIs to read in the wave file in chunks.


They are on the pallette under Graphics and Sound>>Sound>>Files.

0 Kudos
Message 6 of 10

I have tried that a few times but i get Not enough memory error. 

using the Sound file read simple.


i also tried it manually using i as the offset and colsing the file each time. (see picture)


the standard sound file read wont split the file.

0 Kudos
Message 7 of 10

There is an input on the Sound File Read for how many samples to read.  You can read in chunks of the file at a time.  It keeps track of your location, so in a while loop, just read say 1000 samples at a time, and deicmate it for your plot.

Message 8 of 10

hello....sir i am trying to chank the audio file, but i cant get proper sir plz give me some suggestion.

0 Kudos
Message 9 of 10

Hi charmy,


where exactly do you have problems with?

What kind of "audio file" are you talking about?

What is " to chank"?

Best regards,

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 10 of 10