SoX Error While Merging Multiple Audio files

0

I am trying to merge a folder full of wav files with the command sox *.wav combined.wav and am getting this error:

sox formats: no handler for detected file type `inode/x-empty; charset=binary'

I Googled the error and cannot find any solutions. Can anyone describe how to fix this error, or what flags to add to sox while running the command? Thanks. Here is the wav files I am trying to combine:

10-51-52-0025.raw.wav  11-06-29-0030.raw.wav  11-16-29-0536.raw.wav
10-52-52-0062.raw.wav  11-07-29-0085.raw.wav  11-17-29-0749.raw.wav
10-58-28-0559.raw.wav  11-08-29-0135.raw.wav  11-18-29-0812.raw.wav
10-59-28-0655.raw.wav  11-09-29-0192.raw.wav  11-19-29-0909.raw.wav
11-00-28-0696.raw.wav  11-10-29-0242.raw.wav  11-27-07-0658.raw.wav
11-01-28-0744.raw.wav  11-11-29-0298.raw.wav  11-28-07-0731.raw.wav
11-02-28-0828.raw.wav  11-12-29-0348.raw.wav  11-29-07-0779.raw.wav
11-03-28-0876.raw.wav  11-13-29-0432.raw.wav  11-30-07-0834.raw.wav
11-04-28-0941.raw.wav  11-14-29-0483.raw.wav
11-05-28-0989.raw.wav  11-15-29-0508.raw.wav

user02103012

Posted 2016-08-26T16:27:39.597

Reputation: 25

Answers

0

Better to you use ffmpeg.

ffmpeg -f concat -i <(printf "file '$PWD/%s'\n" ./*.wav) -c copy output.wav

https://trac.ffmpeg.org/wiki/Concatenate

Ipor Sircer

Posted 2016-08-26T16:27:39.597

Reputation: 3 578

0

From http://sox.sourceforge.net/sox.html :

To determine the format of an input file, SoX will use, in order of precedence and as given or available:

  1. Command-line format options.
  2. The contents of the file header.
  3. The filename extension.

So if you are sure the files are of the WAVE format, you could try adding -t wav:

sox -t wav *.wav combined.wav

If the files are in fact of raw file format or they are missing information like bit depth (-b) and rate (-r), you will have to provide these parameters as well. More info on that in Converting RAW audio data to WAV with scripting.

qubodup

Posted 2016-08-26T16:27:39.597

Reputation: 3 736