I am processing a WAV file that is over 20 hours in duration (Fs=8,000, 16 bits/sample). I read in each hour of audio separately (using [Y, FS]=audioread(FILENAME, [START END])) and I process the audio signal for each hour no problem. I then need to combine the processed audio data for each hour and write it to a 20+ hour WAV file at the end. However, I don't have enough RAM to do so. I am unable to create an array of such a size. Is there any way of writing these data to a WAV file without bringing this large array itself into memory? Or is there a way of partially writing to a single WAV file in iterations which may allow me to write each hour of data separately to the same WAV file?
I have tried allocating the memory using a .mat file and then dumpng the processed data that way. But I can't write the data in the mat file to a WAV file without bringing it all in to memory. Could a datastore approach work in this instance? Any advice would be appreicated.
Thanks a lot.