I would like to reduce the volume of an audio file by 10% (so that the new volume will be 90% of the original). How can this be done using SOX? According to the SOX manual it supports a volume option:

-v, --volume FACTOR

Adjust volume by a factor of FACTOR. This is a linear (amplitude) adjustment, so a number less than 1 decreases the volume; greater than 1 increases it. If a negative number is given, then in addition to the volume adjustment, the audio signal will be inverted.

Does that mean that the command sox -v 0.9 audio.wav audio.wav will give me an audio file at 90% the volume of the original?

有帮助吗?

解决方案

It appears to be correct, that

sox -v 0.9 in.wav out.wav

will give you an audio file with 90% volume of the original.

stat will reveal this, when you compare the Maximum amplitude and Minimum amplitude output values.

sox in.wav tmp.wav stat
sox out.wav tmp.wav stat

Note, that using the same file for both input and output file will result in a broken file.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top