1SoX(7)                          Sound eXchange                          SoX(7)
2
3
4

NAME

6       SoX - Sound eXchange, the Swiss Army knife of audio manipulation
7

DESCRIPTION

9       This  manual  describes  SoX  supported  file  formats and audio device
10       types; the SoX manual set starts with sox(1).
11
12       Format types that can SoX can determine by  a  filename  extension  are
13       listed  with  their  names  preceded  by  a dot.  Format types that are
14       optionally built into SoX are marked `(optional)'.
15
16       Format types that can be handled by an external library via an optional
17       pseudo  file  type (currently sndfile or ffmpeg) are marked e.g. `(also
18       with -t sndfile)'.  This might be  useful  if  you  have  a  file  that
19       doesn't work with SoX's default format readers and writers, and there's
20       an external reader or writer for that format.
21
22       To see if SoX has support for an optional format or device,  enter  sox
23       -h and look for its name under the list: `AUDIO FILE FORMATS' or `AUDIO
24       DEVICE DRIVERS'.
25
26   SOX FORMATS & DEVICE DRIVERS
27       .raw (also with -t sndfile), .f32, .f64, .s8, .s16, .s24, .s32,
28       .u8, .u16, .u24, .u32, .ul, .al, .lu, .la
29              Raw (headerless) audio files.  For raw, the sample rate and  the
30              data  encoding  must be given using command-line format options;
31              for the other listed types, the sample  rate  defaults  to  8kHz
32              (but may be overridden), and the data encoding is defined by the
33              given suffix.  Thus f32 and f64 indicate files encoded as 32 and
34              64-bit  (IEEE  single  and  double precision) floating point PCM
35              respectively; s8, s16, s24, and s32  indicate  8,  16,  24,  and
36              32-bit  signed  integer  PCM respectively; u8, u16, u24, and u32
37              indicate 8, 16, 24, and  32-bit  unsigned  integer  PCM  respec‐
38              tively;  ul  indicates  `μ-law'  (8-bit),  al  indicates `A-law'
39              (8-bit), and lu and la are inverse bit order `μ-law' and inverse
40              bit order `A-law' respectively.  For all raw formats, the number
41              of channels defaults to 1 (but may be overridden).
42
43              Headerless audio files on a SPARC computer are likely to  be  of
44              format  ul;  on a Mac, they're likely to be u8 but with a sample
45              rate of 11025 or 22050 Hz.
46
47              See .ima and .vox for raw ADPCM formats, and .cdda  for  raw  CD
48              digital audio.
49
50       .f4, .f8, .s1, .s2, .s3, .s4,
51       .u1, .u2, .u3, .u4, .sb, .sw, .sl, .ub, .uw
52              Deprecated aliases for f32, f64, s8, s16, s24, s32,
53              u8, u16, u24, u32, s8, s16, s32, u8, and u16 respectively.
54
55       .8svx (also with -t sndfile)
56              Amiga 8SVX musical instrument description format.
57
58       .aiff, .aif (also with -t sndfile)
59              AIFF  files  as  used on old Apple Macs, Apple IIc/IIgs and SGI.
60              SoX's AIFF support does not include multiple  audio  chunks,  or
61              the  8SVX musical instrument description format.  AIFF files are
62              multimedia archives and can  have  multiple  audio  and  picture
63              chunks  -  you  may  need a separate archiver to work with them.
64              With Mac OS X, AIFF has been superseded by CAF.
65
66       .aiffc, .aifc (also with -t sndfile)
67              AIFF-C is a format based on AIFF that was created to allow  han‐
68              dling compressed audio.  It can also handle little endian uncom‐
69              pressed linear data that is often referred to as sowt  encoding.
70              This  encoding  has  also  become the defacto format produced by
71              modern Macs as well as iTunes on  any  platform.   AIFF-C  files
72              produced by other applications typically have the file extension
73              .aif and require looking at its header to detect the  true  for‐
74              mat.  The sowt encoding is the only encoding that SoX can handle
75              with this format.
76
77              AIFF-C is defined in DAVIC 1.4 Part 9 Annex B.  This  format  is
78              referred from ARIB STD-B24, which is specified for Japanese data
79              broadcasting.  Any private chunks are not supported.
80
81       alsa (optional)
82              Advanced Linux Sound Architecture device driver;  supports  both
83              playing  and  recording audio.  ALSA is only used in Linux-based
84              operating systems, though these often support OSS (see below) as
85              well.  Examples:
86                   sox infile -t alsa
87                   sox infile -t alsa default
88                   sox infile -t alsa plughw:0,0
89                   sox -2 -t alsa hw:1 outfile
90              See also play(1), rec(1), and sox(1) -d.
91
92       .amb   Ambisonic  B-Format: a specialisation of .wav with between 3 and
93              16 channels of audio for use with  an  Ambisonic  decoder.   See
94              http://www.ambisonia.com/Members/mleese/file-format-for-b-format
95              for details.  It is up to the user to get the channels  together
96              in the right order and at the correct amplitude.
97
98       .amr-nb (optional)
99              Adaptive  Multi  Rate - Narrow Band speech codec; a lossy format
100              used in 3rd generation mobile telephony and defined in  3GPP  TS
101              26.071 et al.
102
103              AMR-NB  audio  has  a  fixed sampling rate of 8 kHz and supports
104              encoding to the following  bit-rates  (as  selected  by  the  -C
105              option):  0  = 4.75 kbit/s, 1 = 5.15 kbit/s, 2 = 5.9 kbit/s, 3 =
106              6.7 kbit/s, 4 = 7.4 kbit/s 5 = 7.95 kbit/s, 6 = 10.2 kbit/s, 7 =
107              12.2 kbit/s.
108
109       .amr-wb (optional)
110              Adaptive  Multi  Rate  -  Wide Band speech codec; a lossy format
111              used in 3rd generation mobile telephony and defined in  3GPP  TS
112              26.171 et al.
113
114              AMR-WB  audio  has  a fixed sampling rate of 16 kHz and supports
115              encoding to the following  bit-rates  (as  selected  by  the  -C
116              option):  0 = 6.6 kbit/s, 1 = 8.85 kbit/s, 2 = 12.65 kbit/s, 3 =
117              14.25 kbit/s, 4 = 15.85 kbit/s 5  =  18.25  kbit/s,  6  =  19.85
118              kbit/s, 7 = 23.05 kbit/s, 8 = 23.85 kbit/s.
119
120       ao (optional)
121              Xiph.org's  Audio  Output  device driver; works only for playing
122              audio.  It supports a wide range of devices and sound systems  -
123              see  its  documentation  for the full range.  For the most part,
124              SoX's use of libao cannot be configured directly; instead, libao
125              configuration files must be used.
126
127              The  filename  specified is used to determine which libao plugin
128              to use.  Normally, you should specify `default' as the filename.
129              If  that  doesn't give the desired behavior then you can specify
130              the short name for a given plugin (such as pulse for pulse audio
131              plugin).  Examples:
132                   sox infile -t ao
133                   sox infile -t ao default
134                   sox infile -t ao pulse
135              See also play(1) and sox(1) -d.
136
137       .au, .snd (also with -t sndfile)
138              Sun Microsystems AU files.  There are many types of AU file; DEC
139              has invented its own with a  different  magic  number  and  byte
140              order.   To  write a DEC file, use the -L option with the output
141              file options.
142
143              Some .au files are known to have invalid AU headers;  these  are
144              probably  original Sun μ-law 8000 Hz files and can be dealt with
145              using the .ul format (see below).
146
147              It is possible to override AU file header information  with  the
148              -r  and  -c  options,  in which case SoX will issue a warning to
149              that effect.
150
151       .avr   Audio Visual Research format; used by  a  number  of  commercial
152              packages on the Mac.
153
154       .caf (optional)
155              Apple's Core Audio File format.
156
157       .cdda, .cdr
158              `Red Book' Compact Disc Digital Audio (raw audio).  CDDA has two
159              audio  channels  formatted  as  16-bit  signed   integers   (big
160              endian)at  a  sample  rate  of 44.1 kHz.  The number of (stereo)
161              samples in each CDDA track is always a multiple of 588.
162
163       coreaudio (optional)
164              Mac OSX CoreAudio  device  driver:  supports  both  playing  and
165              recording  audio.   If a filename is not specific or if the name
166              is "default" then the default audio  device  is  selected.   Any
167              other  name will be used to select a specific device.  The valid
168              names can be seen in the System Preferences->Sound menu and then
169              under the Output and Input tabs.
170
171              Examples:
172                   sox infile -t coreaudio
173                   sox infile -t coreaudio default
174                   sox infile -t coreaudio "Internal Speakers"
175              See also play(1), rec(1), and sox(1) -d.
176
177       .cvsd, .cvs
178              Continuously Variable Slope Delta modulation.  A headerless for‐
179              mat used to compress speech audio for applications such as voice
180              mail.  This format is sometimes used with bit-reversed samples -
181              the -X format option can be used to set the bit-order.
182
183       .cvu   Continuously Variable Slope Delta modulation (unfiltered).  This
184              is an alternative handler for CVSD that is unfiltered but can be
185              used with any bit-rate.  E.g.
186                   sox infile outfile.cvu rate 28k
187                   play -r 28k outfile.cvu sinc -3.4k
188
189       .dat   Text Data files.  These files contain a  textual  representation
190              of  the  sample  data.   There is one line at the beginning that
191              contains the sample rate, and one line that contains the  number
192              of  channels.  Subsequent lines contain two or more numeric data
193              intems: the time since the beginning of the first sample and the
194              sample value for each channel.
195
196              Values  are normalized so that the maximum and minimum are 1 and
197              -1.  This file format can be  used  to  create  data  files  for
198              external  programs such as FFT analysers or graph routines.  SoX
199              can also convert a file in this format  back  into  one  of  the
200              other file formats.
201
202              Example containing only 2 stereo samples of silence:
203
204                  ; Sample Rate 8012
205                  ; Channels 2
206                              0   0    0
207                  0.00012481278   0    0
208
209       .dvms, .vms
210              Used  in  Germany  to  compress  speech audio for voice mail.  A
211              self-describing variant of cvsd.
212
213       .fap (optional)
214              See .paf.
215
216       ffmpeg (optional)
217              This is a pseudo-type that forces ffmpeg to be used. The  actual
218              file  type  is  deduced from the file name (it cannot be used on
219              stdio).  It can read a wide range of audio  files,  not  all  of
220              which  are  documented  here,  and  also the audio track of many
221              video files (including AVI, WMV and MPEG). At present  only  the
222              first audio track of a file can be read.
223
224       .flac (optional; also with -t sndfile)
225              Xiph.org's  Free Lossless Audio CODEC compressed audio.  FLAC is
226              an open, patent-free CODEC designed for compressing  music.   It
227              is  similar  to  MP3  and Ogg Vorbis, but lossless, meaning that
228              audio is compressed in FLAC without any loss in quality.
229
230              SoX can read native FLAC files (.flac) but not  Ogg  FLAC  files
231              (.ogg).  [But see .ogg below for information relating to support
232              for Ogg Vorbis files.]
233
234              SoX can write native FLAC files according to a given or  default
235              compression level.  8 is the default compression level and gives
236              the best (but slowest)  compression;  0  gives  the  least  (but
237              fastest)  compression.   The compression level is selected using
238              the -C option [see sox(1)] with a whole number from 0 to 8.
239
240       .fssd  An alias for the .u8 format.
241
242       .gsrt  Grandstream ring-tone files.  Whilst this file format  can  con‐
243              tain  A-Law,  μ-law,  GSM,  G.722,  G.723, G.726, G.728, or iLBC
244              encoded audio, SoX supports reading and writing only  A-Law  and
245              μ-law.  E.g.
246                 sox music.wav -t gsrt ring.bin
247                 play ring.bin
248
249       .gsm (optional; also with -t sndfile)
250              GSM  06.10  Lossy  Speech  Compression.  A lossy format for com‐
251              pressing speech which is used in the Global Standard for  Mobile
252              telecommunications  (GSM).  It's good for its purpose, shrinking
253              audio data size, but it will introduce  lots  of  noise  when  a
254              given  audio signal is encoded and decoded multiple times.  This
255              format is used by some voice mail applications.   It  is  rather
256              CPU intensive.
257
258       .hcom  Macintosh  HCOM  files.   These  are Mac FSSD files with Huffman
259              compression.
260
261       .htk   Single channel 16-bit PCM format used  by  HTK,  a  toolkit  for
262              building Hidden Markov Model speech processing tools.
263
264       .ircam (also with -t sndfile)
265              Another name for .sf.
266
267       .ima (also with -t sndfile)
268              A  headerless  file  of  IMA  ADPCM audio data. IMA ADPCM claims
269              16-bit precision packed into only 4 bits, but in fact sounds  no
270              better than .vox.
271
272       .lpc, .lpc10
273              LPC-10  is  a  compression  scheme  for  speech developed in the
274              United  States.   See   http://www.arl.wustl.edu/~jaf/lpc/   for
275              details.  There is no associated file format, so SoX's implemen‐
276              tation is headerless.
277
278       .mat, .mat4, .mat5 (optional)
279              Matlab 4.2/5.0 (respectively GNU Octave 2.0/2.1) format (.mat is
280              the same as .mat4).
281
282       .m3u   A  playlist  format;  contains  a  list of audio files.  SoX can
283              read, but not write this file format.  See [1]  for  details  of
284              this format.
285
286       .maud  An  IFF-conforming audio file type, registered by MS MacroSystem
287              Computer GmbH, published along with the `Toccata' sound-card  on
288              the  Amiga.   Allows  8bit linear, 16bit linear, A-Law, μ-law in
289              mono and stereo.
290
291       .mp3, .mp2 (optional read, optional write)
292              MP3 compressed audio; MP3 (MPEG  Layer  3)  is  a  part  of  the
293              patent-encumbered  MPEG  standards  for audio and video compres‐
294              sion.  It is a lossy compression format that achieves good  com‐
295              pression rates with little quality loss.
296
297              Because MP3 is patented, SoX cannot be distributed with MP3 sup‐
298              port without incurring the  patent  holder's  fees.   Users  who
299              require  SoX  with  MP3 support must currently compile and build
300              SoX with the MP3 libraries (LAME & MAD) from source code, or, in
301              some cases, obtain pre-built dynamically loadable libraries.
302
303              When  reading  MP3  files,  up to 28 bits of precision is stored
304              although only 16 bits is reported to user.   This  is  to  allow
305              default  behavior  of  writing  16 bit output files.  A user can
306              specify a higher precision for the output file to prevent  loss‐
307              ing  this extra information.  MP3 output files will use up to 24
308              bits of precision while encoding.
309
310              MP3 compression parameters can be selected using SoX's -C option
311              as follows (note that the current syntax is subject to change):
312
313              The  primary  parameter  to the LAME encoder is the bit rate. If
314              the value of the -C value is a positive integer, it's  taken  as
315              the bitrate in kbps (e.g. if you specify 128, it uses 128 kbps).
316
317              The  second  most  important  parameter  is  probably  "quality"
318              (really performance), which allows balancing encoding speed  vs.
319              quality.  In LAME, 0 specifies highest quality but is very slow,
320              while 9 selects poor quality, but is fast. (5 is the default and
321              2 is recommended as a good trade-off for high quality encodes.)
322
323              Because  the -C value is a float, the fractional part is used to
324              select quality. 128.2 selects 128 kbps encoding with  a  quality
325              of  2.  There  is one problem with this approach. We need 128 to
326              specify 128 kbps encoding with default quality, so 0  means  use
327              default.  Instead  of  0 you have to use .01 (or .99) to specify
328              the highest quality (128.01 or 128.99).
329
330              LAME uses bitrate to specify  a  constant  bitrate,  but  higher
331              quality can be achieved using Variable Bit Rate (VBR). VBR qual‐
332              ity (really size) is selected using a number from 0 to 9. Use  a
333              value  of  0  for  high quality, larger files, and 9 for smaller
334              files of lower quality. 4 is the default.
335
336              In order to squeeze the selection of VBR into the the  -C  value
337              float  we  use negative numbers to select VRR. -4.2 would select
338              default VBR encoding (size) with high quality (speed). One  spe‐
339              cial  case is 0, which is a valid VBR encoding parameter but not
340              a valid bitrate.  Compression value of 0 is always treated as  a
341              high  quality  vbr, as a result both -0.2 and 0.2 are treated as
342              highest quality VBR (size) and high quality (speed).
343
344              See also Ogg Vorbis for a similar format.
345
346       .mp4, .m4a (optional)
347              MP4 compressed audio.  MP3 (MPEG 4) is part of  the  MPEG  stan‐
348              dards  for audio and video compression.  See mp3 for more infor‐
349              mation.
350
351       .nist (also with -t sndfile)
352              See .sph.
353
354       .ogg, .vorbis (optional)
355              Xiph.org's Ogg Vorbis compressed  audio;  an  open,  patent-free
356              CODEC  designed  for  music  and streaming audio.  It is a lossy
357              compression format (similar to MP3, VQF  &  AAC)  that  achieves
358              good compression rates with a minimum amount of quality loss.
359
360              SoX  can decode all types of Ogg Vorbis files, and can encode at
361              different compression levels/qualities given as a number from -1
362              (highest  compression/lowest quality) to 10 (lowest compression,
363              highest quality).  By default the encoding quality  level  is  3
364              (which  gives  an encoded rate of approx. 112kbps), but this can
365              be changed using the -C option (see above) with a number from -1
366              to  10; fractional numbers (e.g.  3.6) are also allowed.  Decod‐
367              ing is somewhat CPU intensive and encoding is  very  CPU  inten‐
368              sive.
369
370              See also .mp3 for a similar format.
371
372       oss (optional)
373              Open  Sound System /dev/dsp device driver; supports both playing
374              and recording audio.  OSS  support  is  available  in  Unix-like
375              operating  systems,  sometimes  together  with alternative sound
376              systems (such as ALSA).  Examples:
377                   sox infile -t oss
378                   sox infile -t oss /dev/dsp
379                   sox -2 -t oss /dev/dsp outfile
380              See also play(1), rec(1), and sox(1) -d.
381
382       .paf, .fap (optional)
383              Ensoniq PARIS file format (big and little-endian respectively).
384
385       .pls   A playlist format; contains a list  of  audio  files.   SoX  can
386              read,  but  not  write this file format.  See [2] for details of
387              this format.
388
389              Note: SoX support for SHOUTcast PLS relies  on  wget(1)  and  is
390              only  partially  supported:  it's necessary to specify the audio
391              type manually, e.g.
392                   play -t mp3 "http://a.server/pls?rn=265&file=filename.pls"
393              and SoX does not know about alternative  servers  -  hit  Ctrl-C
394              twice in quick succession to quit.
395
396       .prc   Psion  Record. Used in Psion EPOC PDAs (Series 5, Revo and simi‐
397              lar) for System alarms  and  recordings  made  by  the  built-in
398              Record  application.  When writing, SoX defaults to A-law, which
399              is recommended; if you must use ADPCM, then use the  -i  switch.
400              The  sound  quality is poor because Psion Record seems to insist
401              on frames of 800 samples or fewer, so that the ADPCM  CODEC  has
402              to  be  reset  at  every  800  frames, which causes the sound to
403              glitch every tenth of a second.
404
405       pulseaudio (optional)
406              PulseAudio driver; supports both playing and recording of audio.
407              PulseAudio  is  a  cross  platform networked sound server.  If a
408              file name is specified with this driver, it is  ignored.   Exam‐
409              ples:
410                   sox infile -t pulseaudio
411                   sox infile -t pulseaudio default
412              See also play(1), rec(1), and sox(1) -d.
413
414       .pvf (optional)
415              Portable Voice Format.
416
417       .sd2 (optional)
418              Sound Designer 2 format.
419
420       .sds (optional)
421              MIDI Sample Dump Standard.
422
423       .sf (also with -t sndfile)
424              IRCAM   SDIF  (Institut  de  Recherche  et  Coordination  Acous‐
425              tique/Musique Sound Description  Interchange  Format).  Used  by
426              academic  music  software  such  as  the CSound package, and the
427              MixView sound sample editor.
428
429       .sln   Asterisk PBX `signed linear' 8khz, 16-bit signed  integer,  lit‐
430              tle-endian raw format.
431
432       .sph, .nist (also with -t sndfile)
433              SPHERE  (SPeech  HEader  Resources)  is a file format defined by
434              NIST (National Institute of Standards  and  Technology)  and  is
435              used with speech audio.  SoX can read these files when they con‐
436              tain μ-law and PCM data.  It will ignore any header  information
437              that  says  the data is compressed using shorten compression and
438              will treat the data as either μ-law or PCM.  This will allow SoX
439              and  the  command  line shorten program to be run together using
440              pipes to encompasses the data and then pass the  result  to  SoX
441              for processing.
442
443       .smp   Turtle Beach SampleVision files.  SMP files are for use with the
444              PC-DOS package SampleVision by  Turtle  Beach  Softworks.   This
445              package is for communication to several MIDI samplers.  All sam‐
446              ple rates are supported by the package,  although  not  all  are
447              supported by the samplers themselves.  Currently loop points are
448              ignored.
449
450       .snd   See .au, .sndr and .sndt.
451
452       sndfile (optional)
453              This is a pseudo-type that forces libsndfile  to  be  used.  For
454              writing  files, the actual file type is then taken from the out‐
455              put file name; for reading them, it is deduced from the file.
456
457       sndio (optional)
458              OpenBSD audio device driver; supports both playing and recording
459              audio.
460                   sox infile -t sndio
461              See also play(1), rec(1), and sox(1) -d.
462
463       .sndr  Sounder  files.   An  MS-DOS/Windows format from the early '90s.
464              Sounder files usually have the extension `.SND'.
465
466       .sndt  SoundTool files.  An MS-DOS/Windows format from the early  '90s.
467              SoundTool files usually have the extension `.SND'.
468
469       .sou   An alias for the .u8 raw format.
470
471       .sox   SoX's  native  uncompressed PCM format, intended for storing (or
472              piping) audio at intermediate processing  points  (i.e.  between
473              SoX  invocations).   It has much in common with the popular WAV,
474              AIFF, and AU uncompressed PCM formats,  but  has  the  following
475              specific  characteristics:  the PCM samples are always stored as
476              32 bit signed integers, the samples are stored (by  default)  as
477              `native  endian',  and  the  number  of  samples  in the file is
478              recorded as a 64-bit integer.  Comments are also supported.
479
480              See `Special Filenames' in sox(1) for examples of using the .sox
481              format with `pipes'.
482
483       sunau (optional)
484              Sun  /dev/audio device driver; supports both playing and record‐
485              ing audio.  For example:
486                   sox infile -t sunau /dev/audio
487              or
488                   sox infile -t sunau -U -c 1 /dev/audio
489              for older sun equipment.
490
491              See also play(1), rec(1), and sox(1) -d.
492
493       .txw   Yamaha TX-16W sampler.  A file format  from  a  Yamaha  sampling
494              keyboard which wrote IBM-PC format 3.5" floppies.  Handles read‐
495              ing of files which do not have the sample rate field set to  one
496              of   the  expected  by  looking  at  some  other  bytes  in  the
497              attack/loop length fields, and defaulting to 33 kHz if the  sam‐
498              ple rate is still unknown.
499
500       .vms   See .dvms.
501
502       .voc (also with -t sndfile)
503              Sound  Blaster  VOC files.  VOC files are multi-part and contain
504              silence parts, looping, and different sample rates for different
505              chunks.   On  input, the silence parts are filled out, loops are
506              rejected, and sample data with a new sample  rate  is  rejected.
507              Silence with a different sample rate is generated appropriately.
508              On output, silence is not detected, nor  are  impossible  sample
509              rates.   SoX  supports  reading (but not writing) VOC files with
510              multiple  blocks,  and  files  containing  μ-law,   A-law,   and
511              2/3/4-bit ADPCM samples.
512
513       .vorbis
514              See .ogg.
515
516       .vox (also with -t sndfile)
517              A  headerless  file  of  Dialogic/OKI  ADPCM audio data commonly
518              comes with the extension .vox.  This ADPCM data has 12-bit  pre‐
519              cision packed into only 4-bits.
520
521              Note:  some  early  Dialogic  hardware does not always reset the
522              ADPCM encoder at the start of each vox file.  This can result in
523              clipping and/or DC offset problems when it comes to decoding the
524              audio.  Whilst little can be done about the clipping, a DC  off‐
525              set  can be removed by passing the decoded audio through a high-
526              pass filter, e.g.:
527                   sox input.vox output.wav highpass 10
528
529       .w64 (optional)
530              Sonic Foundry's 64-bit RIFF/WAV format.
531
532       .wav (also with -t sndfile)
533              Microsoft .WAV RIFF files.  This is the native audio file format
534              of Windows, and widely used for uncompressed audio.
535
536              Normally  .wav  files  have  all formatting information in their
537              headers, and so do not need any format options specified for  an
538              input file.  If any are, they will override the file header, and
539              you will be warned to this effect.  You had better know what you
540              are doing! Output format options will cause a format conversion,
541              and the .wav will written appropriately.
542
543              SoX can read and write linear PCM, floating point, μ-law, A-law,
544              MS ADPCM, and IMA (or DVI) ADPCM encoded samples.  WAV files can
545              also contain audio encoded in many  other  ways  (not  currently
546              supported  with  SoX)  e.g.  MP3;  in some cases such a file can
547              still be read by SoX by overriding the file type, e.g.
548                 play -t mp3 mp3-encoded.wav
549              Big endian versions of RIFF files, called RIFX,  are  also  sup‐
550              ported.  To write a RIFX file, use the -B option with the output
551              file options.
552
553       waveaudio (optional)
554              MS-Windows native audio device driver.  Examples:
555                   sox infile -t waveaudio
556                   sox infile -t waveaudio default
557                   sox infile -t waveaudio 1
558                   sox infile -t waveaudio "High Definition Audio Device ("
559              If the device name is omitted, -1, or default, then you get  the
560              `Microsoft Wave Mapper' device.  Wave Mapper means `use the sys‐
561              tem default audio devices'.   You  can  control  what  `default'
562              means via the OS Control Panel.
563
564              If  the  device  name  given  is some other number, you get that
565              audio device by index; so recording with device name 0 would get
566              the first input device (perhaps the microphone), 1 would get the
567              second (perhaps line in), etc.  Playback using 0  will  get  the
568              first output device (usually the only audio device).
569
570              If  the  device name given is something other than a number, SoX
571              tries to match it (maximum 31 characters) against the  names  of
572              the available devices.
573
574              See also play(1), rec(1), and sox(1) -d.
575
576       .wavpcm
577              A non-standard, but widely used, variant of .wav.  Some applica‐
578              tions cannot read a standard WAV  file  header  for  PCM-encoded
579              data with sample-size greater than 16-bits or with more than two
580              channels, but can read a non-standard WAV header.  It is  likely
581              that such applications will eventually be updated to support the
582              standard header, but in the mean time, this SoX  format  can  be
583              used  to  create  files with the non-standard header that should
584              work with these applications.  (Note that SoX will automatically
585              detect and read WAV files with the non-standard header.)
586
587              The  most common use of this file-type is likely to be along the
588              following lines:
589                   sox infile.any -t wavpcm -s outfile.wav
590
591       .wv (optional)
592              WavPack lossless audio compression.  Note that, when  converting
593              .wav  to this format and back again, the RIFF header is not nec‐
594              essarily preserved losslessly (though the audio is).
595
596       .wve (also with -t sndfile)
597              Psion 8-bit A-law.  Used on Psion SIBO PDAs (Series 3 and  simi‐
598              lar).  This format is deprecated in SoX, but will continue to be
599              used in libsndfile.
600
601       .xa    Maxis XA files.  These are 16-bit  ADPCM  audio  files  used  by
602              Maxis  games.   Writing  .xa  files  is currently not supported,
603              although adding write support should not be very difficult.
604
605       .xi (optional)
606              Fasttracker 2 Extended Instrument format.
607

SEE ALSO

609       sox(1), soxi(1), libsox(3), octave(1), wget(1)
610
611       The SoX web page at http://sox.sourceforge.net
612       SoX scripting examples at http://sox.sourceforge.net/Docs/Scripts
613
614   References
615       [1]    Wikipedia, M3U, http://en.wikipedia.org/wiki/M3U
616
617       [2]    Wikipedia, PLS, http://en.wikipedia.org/wiki/PLS_(file_format)
618

LICENSE

620       Copyright 1998-2013 Chris Bagwell and SoX Contributors.
621       Copyright 1991 Lance Norskog and Sundry Contributors.
622

AUTHORS

624       Chris Bagwell (cbagwell@users.sourceforge.net).  Other authors and con‐
625       tributors are listed in the ChangeLog file that is distributed with the
626       source code.
627
628
629
630soxformat                      February 1, 2013                         SoX(7)
Impressum