'\" t'\" The line above instructs most `man' programs to invoke tbl'\"'\" Separate paragraphs; not the same as PP which resets indent level..de SP.if t .sp .5.if n .sp..'\"'\" Replacement em-dash for nroff (default is too short)..ie n .ds m " - .el .ds m \(em'\"'\" Placeholder macro for if longer nroff arrow is needed..ds RA \(->'\"'\" Decimal point set slightly raised.if t .ds d \v'-.15m'.\v'+.15m'.if n .ds d .'\"'\" Enclosure macro for examples.de EX.SP.nf.ft CW...de EE.ft R.SP.fi...TH SoX 7 "December 31, 2014" "soxformat" "Sound eXchange".SH NAMESoX \- Sound eXchange, the Swiss Army knife of audio manipulation.SH DESCRIPTIONThis manual describes SoX supported file formats and audio device types;the SoX manual set starts with.BR sox (1)..SPFormat types that can SoX can determine by a filenameextension are listed with their names preceded by a dot.Format types that are optionally built into SoXare marked `(optional)'..SPFormat types that can be handled by anexternal library via an optional pseudo file type (currently.BR sndfile )are marked e.g. `(also with \fB\-t sndfile\fR)'. This might beuseful if you have a file that doesn't work with SoX's default formatreaders and writers, and there's an external reader or writer for thatformat..SPTo see if SoX has support for an optional format or device, enter.B sox \-hand look for its name under the list:`AUDIO FILE FORMATS' or `AUDIO DEVICE DRIVERS'..SS SOX FORMATS & DEVICE DRIVERS\&\fB.raw\fR (also with \fB\-t sndfile\fR),\&\fB.f32\fR, \fB.f64\fR,\&\fB.s8\fR, \fB.s16\fR, \fB.s24\fR, \fB.s32\fR,.br\&\fB.u8\fR, \fB.u16\fR, \fB.u24\fR, \fB.u32\fR,\&\fB.ul\fR, \fB.al\fR, \fB.lu\fR, \fB.la\fR.if t .sp -.5.if n .sp -1.TP\ Raw (headerless) audio files. For.BR raw ,the sample rate and the data encoding must be given using command-lineformat options; for the other listed types, the sample rate defaults to8kHz (but may be overridden), and the data encoding is defined by thegiven suffix. Thus \fBf32\fR and \fBf64\fR indicate files encoded as 32and 64-bit (IEEE single and double precision) floating point PCMrespectively; \fBs8\fR, \fBs16\fR, \fBs24\fR, and \fBs32\fR indicate 8,16, 24, and 32-bit signed integer PCM respectively; \fBu8\fR, \fBu16\fR,\fBu24\fR, and \fBu32\fR indicate 8, 16, 24, and 32-bit unsigned integerPCM respectively; \fBul\fR indicates `\(*m-law' (8-bit), \fBal\fRindicates `A-law' (8-bit), and \fBlu\fR and \fBla\fR are inverse bitorder `\(*m-law' and inverse bit order `A-law' respectively. For all rawformats, the number of channels defaults to 1 (but may be overridden)..SPHeaderless audio files on a SPARC computer are likely to be of format\fBul\fR; on a Mac, they're likely to be \fBu8\fR but with asample rate of 11025 or 22050\ Hz..SPSee.B .imaand.B .voxfor raw ADPCM formats, and.B .cddafor raw CD digital audio..PP\&\fB.f4\fR, \fB.f8\fR,\&\fB.s1\fR, \fB.s2\fR, \fB.s3\fR, \fB.s4\fR,.br\&\fB.u1\fR, \fB.u2\fR, \fB.u3\fR, \fB.u4\fR,\&\fB.sb\fR, \fB.sw\fR, \fB.sl\fR, \fB.ub\fR, \fB.uw\fR.if t .sp -.5.if n .sp -1.TP\ Deprecated aliases for\fBf32\fR, \fBf64\fR, \fBs8\fR, \fBs16\fR, \fBs24\fR, \fBs32\fR,.br\fBu8\fR, \fBu16\fR, \fBu24\fR, \fBu32\fR,\fBs8\fR, \fBs16\fR, \fBs32\fR, \fBu8\fR, and \fBu16\fRrespectively..TP\&\fB.8svx\fR (also with \fB\-t sndfile\fR)Amiga 8SVX musical instrument description format..TP\&\fB.aiff\fR, \fB.aif\fR (also with \fB\-t sndfile\fR)AIFF files as used on old Apple Macs, Apple IIc/IIgs and SGI.SoX's AIFF support does not include multiple audio chunks,or the 8SVX musical instrument description format.AIFF files are multimedia archives andcan have multiple audio and picture chunks\*myou may need a separate archiver to work with them.With Mac OS X, AIFF has been superseded by CAF..TP\&\fB.aiffc\fR, \fB.aifc\fR (also with \fB\-t sndfile\fR)AIFF-C is a format based on AIFF that was created to allowhandling compressed audio. It can also handle littleendian uncompressed linear data that is often referred toas.B sowt encoding. This encoding has also become the defacto format produced by modern Macs as well as iTunes on any platform. AIFF-C files produced by other applications typically have the file extension .aif andrequire looking at its header to detect the true format.The .B sowtencoding is the only encoding that SoX can handle with this format..SPAIFF-C is defined in DAVIC 1.4 Part 9 Annex B.This format is referred from ARIB STD-B24, which is specified forJapanese data broadcasting. Any private chunks are not supported..TP\fBalsa\fR (optional)Advanced Linux Sound Architecture device driver; supports both playing andrecording audio. ALSA is only used in Linux-based operating systems, thoughthese often support OSS (see below) as well. Examples:.EX sox infile \-t alsa sox infile \-t alsa default sox infile \-t alsa plughw:0,0 sox \-b 16 \-t alsa hw:1 outfile.EESee also.BR play (1),.BR rec (1),and.BR sox (1).BR \-d ..TP.B .ambAmbisonic B-Format: a specialisation of.B .wavwith between 3 and 16 channels of audio for use with an Ambisonic decoder.See http://www.ambisonia.com/Members/mleese/file-format-for-b-format fordetails. It is up to the user to get the channels together in the rightorder and at the correct amplitude..TP\&\fB.amr\-nb\fR (optional)Adaptive Multi Rate\*mNarrow Band speech codec; a lossy format used in 3rdgeneration mobile telephony and defined in 3GPP TS 26.071 et al..SPAMR-NB audio has a fixed sampling rate of 8 kHz and supports encodingto the following bit-rates (as selected by the.B \-Coption): 0 = 4\*d75 kbit/s, 1 = 5\*d15 kbit/s, 2 = 5\*d9 kbit/s, 3 =6\*d7 kbit/s, 4 = 7\*d4 kbit/s 5 = 7\*d95 kbit/s, 6 = 10\*d2kbit/s, 7 = 12\*d2 kbit/s..TP\&\fB.amr\-wb\fR (optional)Adaptive Multi Rate\*mWide Band speech codec; a lossy format used in 3rdgeneration mobile telephony and defined in 3GPP TS 26.171 et al..SPAMR-WB audio has a fixed sampling rate of 16 kHz and supports encodingto the following bit-rates (as selected by the.B \-Coption): 0 = 6\*d6 kbit/s, 1 = 8\*d85 kbit/s, 2 = 12\*d65 kbit/s, 3 =14\*d25 kbit/s, 4 = 15\*d85 kbit/s 5 = 18\*d25 kbit/s, 6 = 19\*d85kbit/s, 7 = 23\*d05 kbit/s, 8 = 23\*d85 kbit/s..TP\fBao\fR (optional)Xiph.org's Audio Output device driver; works only for playing audio. Itsupports a wide range of devices and sound systems\*msee its documentationfor the full range. For the most part, SoX's use of libao cannot beconfigured directly; instead, libao configuration files must be used..SPThe filename specified is used to determine which libao plugin touse. Normally, you should specify `default' as the filename. If thatdoesn't give the desired behavior then you can specify the short namefor a given plugin (such as \fBpulse\fR for pulse audio plugin).Examples:.EX sox infile \-t ao sox infile \-t ao default sox infile \-t ao pulse.EESee also.BR play (1)and.BR sox (1).BR \-d ..TP\&\fB.au\fR, \fB.snd\fR (also with \fB\-t sndfile\fR)Sun Microsystems AU files.There are many types of AU file;DEC has invented its own with a different magic numberand byte order. To write a DEC file, use the.B \-Loption with the output file options..SPSome .au files are known to have invalid AU headers; theseare probably original Sun \(*m-law 8000\ Hz files andcan be dealt with using the.B .ulformat (see below)..SPIt is possible to override AU file header informationwith the.B \-rand.B \-coptions, in which case SoX will issue a warning to that effect..TP.B .avrAudio Visual Research format;used by a number of commercial packageson the Mac..TP\&\fB.caf\fR (optional)Apple's Core Audio File format..TP\&\fB.cdda\fR, \fB.cdr\fR`Red Book' Compact Disc Digital Audio (raw audio). CDDA has two audiochannels formatted as 16-bit signed integers (big endian)at a samplerate of 44\*d1\ kHz. The number of (stereo) samples in each CDDAtrack is always a multiple of 588..TP\fBcoreaudio\fR (optional)Mac OSX CoreAudio device driver: supports both playing and recordingaudio. If a filename is not specific or if the name is "default" thenthe default audio device is selected. Any other name will be usedto select a specific device. The valid names can be seen in theSystem Preferences->Sound menu and then under the Output and Input tabs. Examples:.EX sox infile \-t coreaudio sox infile \-t coreaudio default sox infile \-t coreaudio "Internal Speakers".EESee also.BR play (1),.BR rec (1),and.BR sox (1).BR \-d ..TP\&\fB.cvsd\fR, \fB.cvs\fRContinuously Variable Slope Delta modulation.A headerless format used to compress speech audio for applications such as voice mail.This format is sometimes used with bit-reversed samples\*mthe.B \-Xformat option can be used to set the bit-order..TP\&\fB.cvu\fRContinuously Variable Slope Delta modulation (unfiltered).This is an alternative handler for CVSD that is unfiltered but canbe used with any bit-rate. E.g..EX sox infile outfile.cvu rate 28k play \-r 28k outfile.cvu sinc \-3.4k.EE.TP.B .datText Data files.These files contain a textual representation of thesample data. There is one line at the beginningthat contains the sample rate, and one line thatcontains the number of channels.Subsequent lines contain two or more numeric data intems:the time since the beginning of the first sample and the sample valuefor each channel..SPValues are normalized so that the maximum and minimumare 1 and \-1. This file format can be used tocreate data files for external programs such asFFT analysers or graph routines. SoX can also converta file in this format back into one of the other fileformats..SPExample containing only 2 stereo samples of silence:.SP.EX ; Sample Rate 8012 ; Channels 2 0 0 0 0.00012481278 0 0.EE.TP\&\fB.dvms\fR, \fB.vms\fRUsed in Germany to compress speech audio for voice mail.A self-describing variant of.BR cvsd ..TP\&\fB.fap\fR (optional)See.BR .paf ..TP\&\fB.flac\fR (optional; also with \fB\-t sndfile\fR)Xiph.org's Free Lossless Audio CODEC compressed audio.FLAC is an open, patent-free CODEC designed for compressingmusic. It is similar to MP3 and Ogg Vorbis, but lossless,meaning that audio is compressed in FLAC without any loss inquality..SPSoX can read native FLAC files (.flac) but not Ogg FLAC files (.ogg).[But see.B .oggbelow for information relating to support for OggVorbis files.].SPSoX can write native FLAC files according to a given or defaultcompression level. 8 is the default compression level and gives thebest (but slowest) compression; 0 gives the least (but fastest)compression. The compression level is selected using the.B \-Coption [see.BR sox (1)]with a whole number from 0 to 8..TP.B .fssdAn alias for the.B .u8format..TP.B .gsrtGrandstream ring-tone files.Whilst this file format can contain A-Law, \(*m-law, GSM, G.722,G.723, G.726, G.728, or iLBC encoded audio, SoX supports reading andwriting only A-Law and \(*m-law. E.g..EX sox music.wav \-t gsrt ring.bin play ring.bin.EE.TP\&\fB.gsm\fR (optional; also with \fB\-t sndfile\fR)GSM 06.10 Lossy Speech Compression.A lossy format for compressing speech which is used in theGlobal Standard for Mobile telecommunications (GSM). It's goodfor its purpose, shrinking audio data size, but it will introducelots of noise when a given audio signal is encoded and decodedmultiple times. This format is used by some voice mail applications.It is rather CPU intensive..TP.B .hcomMacintosh HCOM files.These are Mac FSSD files with Huffman compression..TP.B .htkSingle channel 16-bit PCM format used by HTK,a toolkit for building Hidden Markov Model speech processing tools..TP\&\fB.ircam\fR (also with \fB\-t sndfile\fR)Another name for.BR .sf ..TP\&\fB.ima\fR (also with \fB\-t sndfile\fR)A headerless file of IMA ADPCM audio data. IMA ADPCM claims 16-bit precisionpacked into only 4 bits, but in fact sounds no better than.BR .vox ..TP\&\fB.lpc\fR, \fB.lpc10\fRLPC-10 is a compression scheme for speech developed in the UnitedStates. See https://web.archive.org/web/20090226065646/https://www.arl.wustl.edu/~jaf/lpc/ for details. There isno associated file format, so SoX's implementation is headerless..TP\&\fB.mat\fR, \fB.mat4\fR, \fB.mat5\fR (optional)Matlab 4.2/5.0 (respectively GNU Octave 2.0/2.1) format (.mat is the same as .mat4)..TP.B .m3uA.I playlistformat; contains a list of audio files.SoX can read, but not write this file format.See [1] for details of this format..TP.B .maudAn IFF-conforming audio file type, registered byMS MacroSystem Computer GmbH, published alongwith the `Toccata' sound-card on the Amiga.Allows 8bit linear, 16bit linear, A-Law, \(*m-lawin mono and stereo..TP\&\fB.mp3\fR, \fB.mp2\fR (optional read, optional write)MP3 compressed audio; MP3 (MPEG Layer 3) is a part of the patent-encumberedMPEG standards for audio and video compression. It is a lossycompression format that achieves good compression rates with littlequality loss..SPBecause MP3 is patented, SoX cannot be distributed with MP3 support withoutincurring the patent holder's fees. Users who require SoX with MP3 supportmust currently compile and build SoX with the MP3 libraries (LAME & MAD)from source code, or, in some cases, obtain pre-built dynamically loadablelibraries..SPWhen reading MP3 files, up to 28 bits of precision is stored althoughonly 16 bits is reported to user. This is to allow default behaviorof writing 16 bit output files. A user can specify a higher precisionfor the output file to prevent lossing this extra information. MP3output files will use up to 24 bits of precision while encoding..SPMP3 compression parameters can be selected using SoX's \fB\-C\fR optionas follows(note that the current syntax is subject to change):.SPThe primary parameter to the LAME encoder is the bit rate. If thevalue of the \fB\-C\fR value is a positive integer, it's taken asthe bitrate in kbps (e.g. if you specify 128, it uses 128 kbps)..SPThe second most important parameter is probably "quality" (reallyperformance), which allows balancing encoding speed vs. quality.In LAME, 0 specifies highest quality but is very slow, while9 selects poor quality, but is fast. (5 is the default and 2 isrecommended as a good trade-off for high quality encodes.).SPBecause the \fB\-C\fR value is a float, the fractional part is usedto select quality. 128.2 selects 128 kbps encoding with a qualityof 2. There is one problem with this approach. We need 128 to specify128 kbps encoding with default quality, so 0 means use default. Insteadof 0 you have to use .01 (or .99) to specify the highest quality(128.01 or 128.99)..SPLAME uses bitrate to specify a constant bitrate, but higher qualitycan be achieved using Variable Bit Rate (VBR). VBR quality (reallysize) is selected using a number from 0 to 9. Use a value of 0 for highquality, larger files, and 9 for smaller files of lower quality. 4 isthe default..SPIn order to squeeze the selection of VBR into the the \fB\-C\fR valuefloat we use negative numbers to select VRR. -4.2 would select defaultVBR encoding (size) with high quality (speed). One special case is 0,which is a valid VBR encoding parameter but not a valid bitrate.Compression value of 0 is always treated as a high quality vbr, as aresult both -0.2 and 0.2 are treated as highest quality VBR (size) andhigh quality (speed)..SPSee also.B Ogg Vorbisfor a similar format..TP\&\fB.nist\fR (also with \fB\-t sndfile\fR)See \fB.sph\fR..TP\&\fB.ogg\fR, \fB.vorbis\fR (optional)Xiph.org's Ogg Vorbis compressed audio; an open, patent-free CODEC designedfor music and streaming audio. It is a lossy compression format (similar toMP3, VQF & AAC) that achieves good compression rates with a minimum amountof quality loss..SPSoX can decode all types of Ogg Vorbis files, and can encode at differentcompression levels/qualities given as a number from \-1 (highestcompression/lowest quality) to 10 (lowest compression, highest quality).By default the encoding quality level is 3 (which gives an encoded rateof approx. 112kbps), but this can be changed using the.B \-Coption (see above) with a number from \-1 to 10; fractional numbers (e.g.3\*d6) are also allowed.Decoding is somewhat CPU intensive and encoding is very CPU intensive..SPSee also.B .mp3for a similar format..TP\&\fB.opus\fR (optional)Xiph.org's Opus compressed audio; an open, lossy, low-latency codecoffering a wide range of compression rates. It uses the Ogg container..SPSoX can only read Opus files, not write them..TP\fBoss\fR (optional)Open Sound System /dev/dsp device driver; supports both playing andrecording audio. OSS support is available in Unix-like operating systems,sometimes together with alternative sound systems (such as ALSA). Examples:.EX sox infile \-t oss sox infile \-t oss /dev/dsp sox \-b 16 \-t oss /dev/dsp outfile.EESee also.BR play (1),.BR rec (1),and.BR sox (1)Lines 1–500 of 817. Load more
'\" t '\" The line above instructs most `man' programs to invoke tbl '\" '\" Separate paragraphs; not the same as PP which resets indent level. .de SP .if t .sp .5 .if n .sp .. '\" '\" Replacement em-dash for nroff (default is too short). .ie n .ds m " - .el .ds m \(em '\" '\" Placeholder macro for if longer nroff arrow is needed. .ds RA \(-> '\" '\" Decimal point set slightly raised .if t .ds d \v'-.15m'.\v'+.15m' .if n .ds d . '\" '\" Enclosure macro for examples .de EX .SP .nf .ft CW .. .de EE .ft R .SP .fi .. .TH SoX 7 "December 31, 2014" "soxformat" "Sound eXchange" .SH NAME SoX \- Sound eXchange, the Swiss Army knife of audio manipulation .SH DESCRIPTION This manual describes SoX supported file formats and audio device types; the SoX manual set starts with .BR sox (1). .SP Format types that can SoX can determine by a filename extension are listed with their names preceded by a dot. Format types that are optionally built into SoX are marked `(optional)'. .SP Format types that can be handled by an external library via an optional pseudo file type (currently .BR sndfile ) are marked e.g. `(also with \fB\-t sndfile\fR)'. This might be useful if you have a file that doesn't work with SoX's default format readers and writers, and there's an external reader or writer for that format. .SP To see if SoX has support for an optional format or device, enter .B sox \-h and look for its name under the list: `AUDIO FILE FORMATS' or `AUDIO DEVICE DRIVERS'. .SS SOX FORMATS & DEVICE DRIVERS \&\fB.raw\fR (also with \fB\-t sndfile\fR), \&\fB.f32\fR, \fB.f64\fR, \&\fB.s8\fR, \fB.s16\fR, \fB.s24\fR, \fB.s32\fR, .br \&\fB.u8\fR, \fB.u16\fR, \fB.u24\fR, \fB.u32\fR, \&\fB.ul\fR, \fB.al\fR, \fB.lu\fR, \fB.la\fR .if t .sp -.5 .if n .sp -1 .TP \ Raw (headerless) audio files. For .BR raw , the sample rate and the data encoding must be given using command-line format options; for the other listed types, the sample rate defaults to 8kHz (but may be overridden), and the data encoding is defined by the given suffix. Thus \fBf32\fR and \fBf64\fR indicate files encoded as 32 and 64-bit (IEEE single and double precision) floating point PCM respectively; \fBs8\fR, \fBs16\fR, \fBs24\fR, and \fBs32\fR indicate 8, 16, 24, and 32-bit signed integer PCM respectively; \fBu8\fR, \fBu16\fR, \fBu24\fR, and \fBu32\fR indicate 8, 16, 24, and 32-bit unsigned integer PCM respectively; \fBul\fR indicates `\(*m-law' (8-bit), \fBal\fR indicates `A-law' (8-bit), and \fBlu\fR and \fBla\fR are inverse bit order `\(*m-law' and inverse bit order `A-law' respectively. For all raw formats, the number of channels defaults to 1 (but may be overridden). .SP Headerless audio files on a SPARC computer are likely to be of format \fBul\fR; on a Mac, they're likely to be \fBu8\fR but with a sample rate of 11025 or 22050\ Hz. .SP See .B .ima and .B .vox for raw ADPCM formats, and .B .cdda for raw CD digital audio. .PP \&\fB.f4\fR, \fB.f8\fR, \&\fB.s1\fR, \fB.s2\fR, \fB.s3\fR, \fB.s4\fR, .br \&\fB.u1\fR, \fB.u2\fR, \fB.u3\fR, \fB.u4\fR, \&\fB.sb\fR, \fB.sw\fR, \fB.sl\fR, \fB.ub\fR, \fB.uw\fR .if t .sp -.5 .if n .sp -1 .TP \ Deprecated aliases for \fBf32\fR, \fBf64\fR, \fBs8\fR, \fBs16\fR, \fBs24\fR, \fBs32\fR, .br \fBu8\fR, \fBu16\fR, \fBu24\fR, \fBu32\fR, \fBs8\fR, \fBs16\fR, \fBs32\fR, \fBu8\fR, and \fBu16\fR respectively. .TP \&\fB.8svx\fR (also with \fB\-t sndfile\fR) Amiga 8SVX musical instrument description format. .TP \&\fB.aiff\fR, \fB.aif\fR (also with \fB\-t sndfile\fR) AIFF files as used on old Apple Macs, Apple IIc/IIgs and SGI. SoX's AIFF support does not include multiple audio chunks, or the 8SVX musical instrument description format. AIFF files are multimedia archives and can have multiple audio and picture chunks\*m you may need a separate archiver to work with them. With Mac OS X, AIFF has been superseded by CAF. .TP \&\fB.aiffc\fR, \fB.aifc\fR (also with \fB\-t sndfile\fR) AIFF-C is a format based on AIFF that was created to allow handling compressed audio. It can also handle little endian uncompressed linear data that is often referred to as .B sowt encoding. This encoding has also become the defacto format produced by modern Macs as well as iTunes on any platform. AIFF-C files produced by other applications typically have the file extension .aif and require looking at its header to detect the true format. The .B sowt encoding is the only encoding that SoX can handle with this format. .SP AIFF-C is defined in DAVIC 1.4 Part 9 Annex B. This format is referred from ARIB STD-B24, which is specified for Japanese data broadcasting. Any private chunks are not supported. .TP \fBalsa\fR (optional) Advanced Linux Sound Architecture device driver; supports both playing and recording audio. ALSA is only used in Linux-based operating systems, though these often support OSS (see below) as well. Examples: .EX sox infile \-t alsa sox infile \-t alsa default sox infile \-t alsa plughw:0,0 sox \-b 16 \-t alsa hw:1 outfile .EE See also .BR play (1), .BR rec (1), and .BR sox (1) .BR \-d . .TP .B .amb Ambisonic B-Format: a specialisation of .B .wav with between 3 and 16 channels of audio for use with an Ambisonic decoder. See http://www.ambisonia.com/Members/mleese/file-format-for-b-format for details. It is up to the user to get the channels together in the right order and at the correct amplitude. .TP \&\fB.amr\-nb\fR (optional) Adaptive Multi Rate\*mNarrow Band speech codec; a lossy format used in 3rd generation mobile telephony and defined in 3GPP TS 26.071 et al. .SP AMR-NB audio has a fixed sampling rate of 8 kHz and supports encoding to the following bit-rates (as selected by the .B \-C option): 0 = 4\*d75 kbit/s, 1 = 5\*d15 kbit/s, 2 = 5\*d9 kbit/s, 3 = 6\*d7 kbit/s, 4 = 7\*d4 kbit/s 5 = 7\*d95 kbit/s, 6 = 10\*d2 kbit/s, 7 = 12\*d2 kbit/s. .TP \&\fB.amr\-wb\fR (optional) Adaptive Multi Rate\*mWide Band speech codec; a lossy format used in 3rd generation mobile telephony and defined in 3GPP TS 26.171 et al. .SP AMR-WB audio has a fixed sampling rate of 16 kHz and supports encoding to the following bit-rates (as selected by the .B \-C option): 0 = 6\*d6 kbit/s, 1 = 8\*d85 kbit/s, 2 = 12\*d65 kbit/s, 3 = 14\*d25 kbit/s, 4 = 15\*d85 kbit/s 5 = 18\*d25 kbit/s, 6 = 19\*d85 kbit/s, 7 = 23\*d05 kbit/s, 8 = 23\*d85 kbit/s. .TP \fBao\fR (optional) Xiph.org's Audio Output device driver; works only for playing audio. It supports a wide range of devices and sound systems\*msee its documentation for the full range. For the most part, SoX's use of libao cannot be configured directly; instead, libao configuration files must be used. .SP The filename specified is used to determine which libao plugin to use. Normally, you should specify `default' as the filename. If that doesn't give the desired behavior then you can specify the short name for a given plugin (such as \fBpulse\fR for pulse audio plugin). Examples: .EX sox infile \-t ao sox infile \-t ao default sox infile \-t ao pulse .EE See also .BR play (1) and .BR sox (1) .BR \-d . .TP \&\fB.au\fR, \fB.snd\fR (also with \fB\-t sndfile\fR) Sun Microsystems AU files. There are many types of AU file; DEC has invented its own with a different magic number and byte order. To write a DEC file, use the .B \-L option with the output file options. .SP Some .au files are known to have invalid AU headers; these are probably original Sun \(*m-law 8000\ Hz files and can be dealt with using the .B .ul format (see below). .SP It is possible to override AU file header information with the .B \-r and .B \-c options, in which case SoX will issue a warning to that effect. .TP .B .avr Audio Visual Research format; used by a number of commercial packages on the Mac. .TP \&\fB.caf\fR (optional) Apple's Core Audio File format. .TP \&\fB.cdda\fR, \fB.cdr\fR `Red Book' Compact Disc Digital Audio (raw audio). CDDA has two audio channels formatted as 16-bit signed integers (big endian)at a sample rate of 44\*d1\ kHz. The number of (stereo) samples in each CDDA track is always a multiple of 588. .TP \fBcoreaudio\fR (optional) Mac OSX CoreAudio device driver: supports both playing and recording audio. If a filename is not specific or if the name is "default" then the default audio device is selected. Any other name will be used to select a specific device. The valid names can be seen in the System Preferences->Sound menu and then under the Output and Input tabs. Examples: .EX sox infile \-t coreaudio sox infile \-t coreaudio default sox infile \-t coreaudio "Internal Speakers" .EE See also .BR play (1), .BR rec (1), and .BR sox (1) .BR \-d . .TP \&\fB.cvsd\fR, \fB.cvs\fR Continuously Variable Slope Delta modulation. A headerless format used to compress speech audio for applications such as voice mail. This format is sometimes used with bit-reversed samples\*mthe .B \-X format option can be used to set the bit-order. .TP \&\fB.cvu\fR Continuously Variable Slope Delta modulation (unfiltered). This is an alternative handler for CVSD that is unfiltered but can be used with any bit-rate. E.g. .EX sox infile outfile.cvu rate 28k play \-r 28k outfile.cvu sinc \-3.4k .EE .TP .B .dat Text Data files. These files contain a textual representation of the sample data. There is one line at the beginning that contains the sample rate, and one line that contains the number of channels. Subsequent lines contain two or more numeric data intems: the time since the beginning of the first sample and the sample value for each channel. .SP Values are normalized so that the maximum and minimum are 1 and \-1. This file format can be used to create data files for external programs such as FFT analysers or graph routines. SoX can also convert a file in this format back into one of the other file formats. .SP Example containing only 2 stereo samples of silence: .SP .EX ; Sample Rate 8012 ; Channels 2 0 0 0 0.00012481278 0 0 .EE .TP \&\fB.dvms\fR, \fB.vms\fR Used in Germany to compress speech audio for voice mail. A self-describing variant of .BR cvsd . .TP \&\fB.fap\fR (optional) See .BR .paf . .TP \&\fB.flac\fR (optional; also with \fB\-t sndfile\fR) Xiph.org's Free Lossless Audio CODEC compressed audio. FLAC is an open, patent-free CODEC designed for compressing music. It is similar to MP3 and Ogg Vorbis, but lossless, meaning that audio is compressed in FLAC without any loss in quality. .SP SoX can read native FLAC files (.flac) but not Ogg FLAC files (.ogg). [But see .B .ogg below for information relating to support for Ogg Vorbis files.] .SP SoX can write native FLAC files according to a given or default compression level. 8 is the default compression level and gives the best (but slowest) compression; 0 gives the least (but fastest) compression. The compression level is selected using the .B \-C option [see .BR sox (1)] with a whole number from 0 to 8. .TP .B .fssd An alias for the .B .u8 format. .TP .B .gsrt Grandstream ring-tone files. Whilst this file format can contain A-Law, \(*m-law, GSM, G.722, G.723, G.726, G.728, or iLBC encoded audio, SoX supports reading and writing only A-Law and \(*m-law. E.g. .EX sox music.wav \-t gsrt ring.bin play ring.bin .EE .TP \&\fB.gsm\fR (optional; also with \fB\-t sndfile\fR) GSM 06.10 Lossy Speech Compression. A lossy format for compressing speech which is used in the Global Standard for Mobile telecommunications (GSM). It's good for its purpose, shrinking audio data size, but it will introduce lots of noise when a given audio signal is encoded and decoded multiple times. This format is used by some voice mail applications. It is rather CPU intensive. .TP .B .hcom Macintosh HCOM files. These are Mac FSSD files with Huffman compression. .TP .B .htk Single channel 16-bit PCM format used by HTK, a toolkit for building Hidden Markov Model speech processing tools. .TP \&\fB.ircam\fR (also with \fB\-t sndfile\fR) Another name for .BR .sf . .TP \&\fB.ima\fR (also with \fB\-t sndfile\fR) A headerless file of IMA ADPCM audio data. IMA ADPCM claims 16-bit precision packed into only 4 bits, but in fact sounds no better than .BR .vox . .TP \&\fB.lpc\fR, \fB.lpc10\fR LPC-10 is a compression scheme for speech developed in the United States. See https://web.archive.org/web/20090226065646/https://www.arl.wustl.edu/~jaf/lpc/ for details. There is no associated file format, so SoX's implementation is headerless. .TP \&\fB.mat\fR, \fB.mat4\fR, \fB.mat5\fR (optional) Matlab 4.2/5.0 (respectively GNU Octave 2.0/2.1) format (.mat is the same as .mat4). .TP .B .m3u A .I playlist format; contains a list of audio files. SoX can read, but not write this file format. See [1] for details of this format. .TP .B .maud An IFF-conforming audio file type, registered by MS MacroSystem Computer GmbH, published along with the `Toccata' sound-card on the Amiga. Allows 8bit linear, 16bit linear, A-Law, \(*m-law in mono and stereo. .TP \&\fB.mp3\fR, \fB.mp2\fR (optional read, optional write) MP3 compressed audio; MP3 (MPEG Layer 3) is a part of the patent-encumbered MPEG standards for audio and video compression. It is a lossy compression format that achieves good compression rates with little quality loss. .SP Because MP3 is patented, SoX cannot be distributed with MP3 support without incurring the patent holder's fees. Users who require SoX with MP3 support must currently compile and build SoX with the MP3 libraries (LAME & MAD) from source code, or, in some cases, obtain pre-built dynamically loadable libraries. .SP When reading MP3 files, up to 28 bits of precision is stored although only 16 bits is reported to user. This is to allow default behavior of writing 16 bit output files. A user can specify a higher precision for the output file to prevent lossing this extra information. MP3 output files will use up to 24 bits of precision while encoding. .SP MP3 compression parameters can be selected using SoX's \fB\-C\fR option as follows (note that the current syntax is subject to change): .SP The primary parameter to the LAME encoder is the bit rate. If the value of the \fB\-C\fR value is a positive integer, it's taken as the bitrate in kbps (e.g. if you specify 128, it uses 128 kbps). .SP The second most important parameter is probably "quality" (really performance), which allows balancing encoding speed vs. quality. In LAME, 0 specifies highest quality but is very slow, while 9 selects poor quality, but is fast. (5 is the default and 2 is recommended as a good trade-off for high quality encodes.) .SP Because the \fB\-C\fR value is a float, the fractional part is used to select quality. 128.2 selects 128 kbps encoding with a quality of 2. There is one problem with this approach. We need 128 to specify 128 kbps encoding with default quality, so 0 means use default. Instead of 0 you have to use .01 (or .99) to specify the highest quality (128.01 or 128.99). .SP LAME uses bitrate to specify a constant bitrate, but higher quality can be achieved using Variable Bit Rate (VBR). VBR quality (really size) is selected using a number from 0 to 9. Use a value of 0 for high quality, larger files, and 9 for smaller files of lower quality. 4 is the default. .SP In order to squeeze the selection of VBR into the the \fB\-C\fR value float we use negative numbers to select VRR. -4.2 would select default VBR encoding (size) with high quality (speed). One special case is 0, which is a valid VBR encoding parameter but not a valid bitrate. Compression value of 0 is always treated as a high quality vbr, as a result both -0.2 and 0.2 are treated as highest quality VBR (size) and high quality (speed). .SP See also .B Ogg Vorbis for a similar format. .TP \&\fB.nist\fR (also with \fB\-t sndfile\fR) See \fB.sph\fR. .TP \&\fB.ogg\fR, \fB.vorbis\fR (optional) Xiph.org's Ogg Vorbis compressed audio; an open, patent-free CODEC designed for music and streaming audio. It is a lossy compression format (similar to MP3, VQF & AAC) that achieves good compression rates with a minimum amount of quality loss. .SP SoX can decode all types of Ogg Vorbis files, and can encode at different compression levels/qualities given as a number from \-1 (highest compression/lowest quality) to 10 (lowest compression, highest quality). By default the encoding quality level is 3 (which gives an encoded rate of approx. 112kbps), but this can be changed using the .B \-C option (see above) with a number from \-1 to 10; fractional numbers (e.g. 3\*d6) are also allowed. Decoding is somewhat CPU intensive and encoding is very CPU intensive. .SP See also .B .mp3 for a similar format. .TP \&\fB.opus\fR (optional) Xiph.org's Opus compressed audio; an open, lossy, low-latency codec offering a wide range of compression rates. It uses the Ogg container. .SP SoX can only read Opus files, not write them. .TP \fBoss\fR (optional) Open Sound System /dev/dsp device driver; supports both playing and recording audio. OSS support is available in Unix-like operating systems, sometimes together with alternative sound systems (such as ALSA). Examples: .EX sox infile \-t oss sox infile \-t oss /dev/dsp sox \-b 16 \-t oss /dev/dsp outfile .EE See also .BR play (1), .BR rec (1), and .BR sox (1)