These encoders convert 16 bit, linear PCM, 16 kHz, mono WAV files into raw G722
and G722.1 files that can be used with FreeSWITCH to play audios and avoid
transcoding. For this to happen you will need to enable the mod_native_file
module in FreeSWITCH and use the G722
and G7221
file extensions.
You need to install the following three libraries to be able to compile the encoders:
sudo apt-get install libsndfile-dev libtiff-dev
From within the FreeSWITCH directory run the following commands:
./bootstrap.sh
cd libs/spandsp
./configure
make
sudo make install
sudo ldconfig
After running the previous commands and going back to the FreeSWITCH directory run:
cd libs/libg722_1
./configure
make
sudo make install
sudo ldconfig
In order to compile the encoders run:
make
sudo make install
The encoders have the following syntax:
g722enc <WAV file> <G722 file>
and:
g7221enc <WAV file> <G7221 file>