How to Install and Configure FusionPBX

Start with a fresh install of Debian Linux. Then run the following commands as root to install Fusion PBX:

# apt update
# apt install libflite1 flite-dev
# wget -O - https://raw.githubusercontent.com/fusionpbx/fusionpbx-install.sh/master/debian/pre-install.sh | sh;
# cd /usr/src/fusionpbx-install.sh/debian && ./install.sh

Once the install finishes, make note of the password and reboot the system. Then log in as admin for the username and the password that you were just given. Once logged in, you can change the username and password if you’d like. Now let’s install an SSL certificate from Let’s Encrypt.

# cd /usr/src/fusionpbx-install.sh/debian/resources/
# ./letsencrypt.sh

It can take a couple of minutes for the TXT record to update so please be patient. Now let’s set up the flite text-to-speech module.

# cd /usr/src/freeswitch-1.10.11
# nano modules.conf

Uncomment the line,

asr_tts/mod_flite

(also make sure that you have mod_cepstral commented out as you can’t use flite and cepstral at the same time. Cepstral is licensed, albeit not very expensive – about 30 dollars per voice – and you can test with their TTS voices though the TTS engine will periodically insert nag messages.)

Now do a make on Freeswitch. This will see that you have enabled the mod_flite and it will download the flite package from http://files.freeswitch.org/downloads/libs (about 14 Megabytes).

Note that if you break the download then you must cd to /usr/local/src/freeswitch/libs and sudo rm -R flite-1.5.1-current* or similar to clean up the broken download and then run make again.

After the make then do a make install.

Once that has done (or perhaps you had already had that uncommented) then you must make sure that the module is autoloaded. To check this go to the runtime program path which is usually /usr/local/freeswitch) e.g.

# cd /usr/local/freeswitch/conf/autoload_configs

and edit the modules.conf.xml and again uncomment the mod_flite line so it is the only one uncommented,

  <!-- ASR /TTS -->
    <load module="mod_flite"/> <!-- -->
    <!-- <load module="mod_pocketsphinx"/> -->
    <!-- <load module="mod_cepstral"/> -->
    <!-- <load module="mod_tts_commandline"/> -->
    <!-- <load module="mod_rss"/> -->

now restart freeswitch. Your feature code text to speech should now work.

Truthfully though the Flite TTS is synthetic (e.g. the rms voice) and will never be as good as a human spoken voice but it does allow you to quickly setup what option codes to use and test your options before you get a human speaker to say a script.

Resource

No text-to-speech with Flite on Freeswitch/Blue.box IVR