Windows – Combining .wav files from the command line

audiocommand linewavwindowswindows 10

I am currently in a directory with command prompt open, and combining wav files using the command

copy /b *.wav allAudio.wav

There are 29 wav files in this directory, each of them exactly 00:00:59 in length.

However, the combined "allAudio.wav" file generated by this command has a file size corresponding to all the merged .wav files in the directory, but the length of the file is only 00:00:59 just like all of the other .wav files in the directory.

This does not make sense to me. If anyone can explain this and suggest a way to actually merge the files such that the final file is correct in length would be great.

Here is the current directory

In total I have more folders containing several hundred wav files that need to be merged, so any software that merges one-at-a-time is not feasible for this task.

Best Answer

This is because the RIFF header contains information about the duration of the file. You need to remove the RIFF headers from all files and create a new one describing the new file. You're treating them like RAW files, which they aren't

You can use sox for this, that would be a better approach

http://sox.sourceforge.net/

The windows binary download is at

http://sourceforge.net/projects/sox/files/sox/

You can also use it to render a png file containing the FFT data and stuff like that. It's a very neat tool.

https://stackoverflow.com/questions/9457020/merge-2-audio-files-in-sox

Related Question