← 返回命令列表

Linux command

sox 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Convert audio format

sox [input.wav] [output.mp3]

Concatenate files

sox [file1.wav] [file2.wav] [output.wav]

Change sample rate

sox [input.wav] -r [44100] [output.wav]

Mix to mono

sox [input.wav] [output.wav] channels 1

Add reverb

sox [input.wav] [output.wav] reverb

Trim audio

sox [input.wav] [output.wav] trim [0] [10]

Normalize volume

sox [input.wav] [output.wav] norm

Record audio

sox -d [output.wav]

说明

sox (Sound eXchange) is a command-line audio processing tool. It converts between formats, applies effects, and can record and play audio. The tool supports many audio formats and provides extensive processing capabilities including filtering, mixing, and format conversion.

参数

-r _rate_
Sample rate.
-c _channels_
Number of channels.
-b _bits_
Sample size in bits.
-e _encoding_
Sample encoding.
-t _type_
File type.
-v _factor_
Volume adjustment.
-d
Default audio device.
--combine _type_
Combine method (concatenate, merge, mix).

FAQ

What is the sox command used for?

sox (Sound eXchange) is a command-line audio processing tool. It converts between formats, applies effects, and can record and play audio. The tool supports many audio formats and provides extensive processing capabilities including filtering, mixing, and format conversion.

How do I run a basic sox example?

Run `sox [input.wav] [output.mp3]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -r _rate_ do in sox?

Sample rate.