Installing soundtouch
In this section, you will find instructions for installing the soundtouch
libraries along with their development dependencies, ensuring compatibility with FreeSWITCH.
Important Note The
soundtouch
library is required only if you plan to use voice morphing features within FreeSWITCH. If you do not need these features, you can skip installing this library.
Important: The default Debian version of SoundTouch is compiled with float samples. However, FreeSWITCH requires SoundTouch to be compiled with integer samples for compatibility. This guide will walk you through how to do that.
Note: This guide is written with Ubuntu as the target operating system. For other operating systems, please refer to the official SoundTouch documentation.
This library is used by freeswitch module mod_soundtouch
. For official documentation on mod_soundtouch
in FreeSWITCH, please visit the FreeSWITCH mod_soundtouch documentation.
Prerequisites
Before starting the installation process, ensure that you have the necessary development tools installed on your system. These include the Autotools toolchain and other build essentials.
Install Build Prerequisites
You can install all the required dependencies using the following command on a Debian/Ubuntu-based system:
sudo apt-get install automake autoconf libtool build-essential
This command installs the following:
- automake, autoconf, and libtool: Used for generating the build scripts.
- build-essential: Provides essential compilation tools like gcc, make, and related utilities.
Installation Steps
Step 1: Download SoundTouch Source Code
You can download the latest version of the SoundTouch source code from the official website. The current latest version is 2.3.3. Download the tarball using wget:
wget https://www.surina.net/soundtouch/soundtouch-2.3.3.tar.gz
Alternatively, you can clone the source code from the official repository:
git clone https://codeberg.org/soundtouch/soundtouch.git
Step 2: Extract the Tarball (if downloaded)
If you downloaded the tarball, extract it using the following command:
tar -xvzf soundtouch-2.3.3.tar.gz
cd soundtouch
If you cloned the repository, navigate to the directory:
cd soundtouch
Step 3: Compiling SoundTouch with Autotools
The SoundTouch project uses the Autotools toolchain for compiling. Follow these steps to build the library:
-
Run
bootstrap
: This creates the configure file using the local Autotools (automake, autoconf) toolset. The configure file is required for configuring the build environment../bootstrap
-
Run
configure
: This configures the SoundTouch package for the local environment. Make sure to enable integer samples to ensure compatibility with FreeSWITCH../configure --enable-integer-samples
-
Compile the Source Code: Run make to compile the SoundTouch library and the SoundStretch utility. Optionally, you can add the -j flag followed by the number of processor cores available on your machine to speed up compilation:
make -j$(nproc)
-
Install the Library: Finally, install the SoundTouch and BPM libraries to /usr/local/lib and the SoundStretch utility to /usr/local/bin. Root privileges may be required to install the binaries.
sudo make install
-
Update the Library Cache: After installation, update the library cache to make sure the system recognizes the newly installed libraries.
sudo ldconfig
For comprehensive instructions on installing and using SoundTouch, please refer to the official documentation and consult the GitHub discussions and issues for additional guidance and troubleshooting tips.