Text-to-speech (TTS) applications vary in their quality, complexity, and price. However, one thing that most high-end TTS engines have in common is a command-line interface for generating audio from text. FreeSWITCH's
mod_tts_commandline module is designed to take advantage of this. While it is completely possible to create a separate module for each engine—and indeed this is the case for
mod_flite—it is convenient to utilize a more generic interface that is somewhat agnostic to the exact TTS engine being used.
In this recipe, we will install
mod_tts_commandline and then download a free TTS engine that has a command-line interface for use with it. We will also show command-line examples of using some commercial TTS engines.