- If your memory issues are caused by whatever processing step you are performing on the audio (such as audio is 300 MB but processing/transform requires 4 GB); then you can simply save the processed audio piece-wise into a -v7.3 matfile, then load it back after to write as audio. Since you are doing the processing piece-wise, this circumvents the memory issue.
- If otherwise your files are simply way too large, then for now I would save multiple files, then use a lightweight third party audio merging software.
How can I write a large audio file without having to store the whole thing in memory at once?
2 次查看(过去 30 天)
显示 更早的评论
I am writing a program to process audio, and it runs into OUT OF MEMORY problems when the files are too large. Is there a way to write an audio file piecemeal so that you don't have to store the entire thing in memory at the same time, for instance, by appending to an existing audio file? I looked in the documentation for audiowrite and it did not look promising (by default it overwrites, and there was no clear "append" option that I could see). It is simple enough to read in and process the audio in a buffer-like way, but I cannot figure out how to write the audio using a similar method. I have the signal processing toolbox, if that helps.
0 个评论
回答(1 个)
Ahmet Cecen
2016-5-9
编辑:Ahmet Cecen
2016-5-9
I don't believe a piece-wise write exists yet for audio files. Until a better answer shows up, I would suggest:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio Processing Algorithm Design 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!