音频处理利器--SoX

SoX(Sound eXchange)是命令行下的一套音频处理组件,号称“音频处理领域内的瑞士军刀。

它有windows、linux、MacOS X等平台下的多个版本。

可在http://sox.sourceforge.net/下载到最新的版本。

NAME
SoX − Sound eXchange, the Swiss Army knife of audio manipulation


SYNOPSIS
sox [global-options] [format-options] infile1
[[format-options] infile2] ... [format-options] outfile
[effect [effect-options]] ...
play [global-options] [format-options] infile1
[[format-options] infile2] ... [format-options]
[effect [effect-options]] ...
rec [global-options] [format-options] outfile
[effect [effect-options]] ...


DESCRIPTION
Introduction
SoX reads and writes audio files in most popular formats and can optionally apply effects to them; it can
combine multiple input sources, synthesise audio, and, on many systems, act as a general purpose audio
player or a multi-track audio recorder. It also has limited ability to split the input in to multiple output files.
All SoX functionality is available using just the sox command, however, to simplify playing and recording
audio, if SoX is invoked as play the output file is automatically set to be the default sound device and if
invoked as rec the default sound device is used as an input source. Additionally, the soxi(1) command provides
a convenient way to just query audio file header information.
The heart of SoX is a library called libSoX. Those interested in extending SoX or using it in other programs
should refer to the libSoX manual page: libsox(3).
SoX is a command-line audio processing tool, particularly suited to making quick, simple edits and to batch
processing. If you need an interactive, graphical audio editor, use audacity(1).
* * *
The overall SoX processing chain can be summarised as follows:
Input(s) ® Combiner ® Effects ® Output(s)
Note however, that on the SoX command line, the positions of the Output(s) and the Effects are swapped
w.r.t. the logical flow just shown. Note also that whilst options pertaining to files are placed before their
respective file name, the opposite is true for effects. To show how this works in practice, here is a selection
of examples of how SoX might be used. The simple
sox recital.au recital.wav
translates an audio file in Sun AU format to a Microsoft WAV file, whilst
sox recital.au -b 16 recital.wav channels 1 rate 16k fade 3 norm
performs the same format translation, but also applies four effects (down-mix to one channel, sample rate
change, fade-in, nomalize), and stores the result at a bit-depth of 16.
sox -r 16k -e signed -b 8 -c 1 voice-memo.raw voice-memo.wav
converts ‘raw’ (a.k.a. ‘headerless’) audio to a self-describing file format,
sox slow.aiff fixed.aiff speed 1.027
adjusts audio speed,
sox short.wav long.wav longer.wav
concatenates two audio files, and
sox -m music.mp3 voice.wav mixed.flac

 

......

你可能感兴趣的:(多媒体处理,audio,exchange,processing,output,command,file)