In this article, we cover how to change tempo and pitch of WAV audio in Ubuntu. WAV is basically a Waveform Audio file format. It was developed by Microsoft and IBM. With tempo we can easily adjust the speed of an audio while pitch is the frequency of sound wave vibration.
The package which we will be utilizing is – soundstretch. It is a command-line audio processing utility, used to adjust tempo and pitch of a WAV audio. For those who are just listening to an audio can easily manage tempo and pitch through a media player. And, the such changes usually last as long as our media application is running. To make permanent changes, we need to process audio files.
We cover the package installation steps first. And, later the processing part.
Note: Following operations require you to have superuser privileges. In case you don’t have one then, we advise you to contact your System Administrator for assistance.
Install soundstretch in Ubuntu
The package is already available through standard Ubuntu repository. Therefore, first update the repository to get the latest version of the package. Hence, open a terminal and issue the following –
sudo apt update
Next, to install soundstretch –
sudo apt install soundstretch
where, apt is Ubuntu’s Advanced Packaging Tool.
Change tempo and pitch of WAV audio in Ubuntu
Use following syntax to adjust tempo of WAV audio in Ubuntu –
soundstretch <input-file.wav> <output-file.wav> -tempo=x
where, x can range between -95% and 5000%.
Similarly, to adjust pitch of WAV audio in Ubuntu –
soundstretch <input-file.wav> <output-file.wav> -pitch=y
where, y can range between -60 and 60 semitones.
If we want to adjust both tempo and pitch simultaneously then,
soundstretch <input-file.wav> <output-file.wav> -tempo=x -pitch=y
Now, let’s say we have an input file – test.wav
soundstretch test.wav output.wav -tempo=100 -pitch=-10
The increase in tempo of output.wav would be 100% while the pitch would be -10 semitones.
In conclusion, we have covered how to change tempo and pitch of WAV audio in Ubuntu here.
Additional Info –
Apart for tempo and pitch we can also adjust playback rate of WAV audio. This can be done through –
soundstretch <input-file.wav> <output-file.wav> -rate=z
where, z can range between -95% and 5000%.