Using TTS Server - ymatto/Station-Manager-2 GitHub Wiki

SM2's included TTS_server Ruby script gives your DJs an automatic "Text To Speech" voice, making announcements on-air in a voice you choose – even when running SM2 using dockerized Liquidsoap. In most cases you can just run the script, configure your SM2 station to use TTS announcements, and you're good to go.

Currently TTS_server only runs on a MacOS host, using the Mac's built-in "say" command. However, it should be easy to modify the script to add your own TTS hanlder to the script for whatever TTS utility and host OS is most convenient for you. Essentially the script takes a request for speech from Station Manager and it must generate an audio file that it provides the path for back to Station Manager to play.

[!NOTE] Use of the TTS_server is not required to use Station Manager. You can skip voice announcements altogether, or you can pre-record announcements however you wish and directly configure those files to be played in your station and show configs.

You can find a little more background on the script itself in the README in the TTS_server folder.

Configuration

You can use environment variables to configure the TTS server, although in most cases defaults can be used.

Expects JSON messages with the following structure: { "tts_type": "macos", "voice": "Daniel (Enhanced)", "text": "Hello, my name is Daniel... Enhanced." }

The values are fed to a supported TTS tool, and a complete path to the resulting file returned.

Use environment variables to set: PORT (defaults to 3000) for the port the server will listen for requests ENDPOINT (defaults to "/say") for the HTTP path for the endpoint for requests OUTPUT_PATH (defaults to "/tmp/") for the resulting audio file

Usage

To enable TTS functionality for your SM2 station, you must separately run the TTS_server script.