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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With