Installing Text to Speech Utilities in ASL3

Having Text to Speech (TTS) on your node is one of those things that I just can’t live without. You can use it for everything from announcing your nodes call to speaking club announcements. Unfortunately TTS is not included with ASL3 out of the box (at least not at the time I am writing this) but I think this will change.

For TTS to work, you need two things on your node. You need a program that can take a string of text and convert it into audio speech and the second part is telling your AllStar node to play the speech. While I was looking around to build these tools myself, I stumbled across a group (at the ASL3 Github) that has already started to work on it. They now have a package that you can install on your node and it works great. This article will explain how to get it installed and use it.

Installing the ASL-TTS package.

The latest version of the package (as of wring this) is release version v1.0.1 and it is not yet in the official repositories so we will install it directly. I am also showing the information here for a Raspberry Pi, if you have ASL3 installed on a PC then you will have to change the name of the package. Login to the terminal on your node and enter the following commands (without the $):

NOTE: I am also showing the information here for a Raspberry Pi, if you have ASL3 installed on a PC then you will have to change the name of the package.

$ cd /tmp
$ https://github.com/AllStarLink/asl3-tts/releases/download/1.0.1-1/asl3-tts_1.0.1-1.deb12_arm64.deb
$ sudo dpkg -i asl3-tts_1.0.1-1.deb12_arm64.deb
$ rm asl3-tts_1.0.1-1.deb12_arm64.deb

Now that the package is installed, you can test it to see if it is working. Make sure you are monitoring your node and type in the following (Replace the <NODE_NUMBER> with your node number):

$ sudo asl-tts -n <NODE_NUMBER> -t  " Hello, This is a test "

If all is going well, you should hear your node talk.

Converting test to a speech file.

For some applications, you might want to convert the speech to an audio file that you can store on the node. This is useful for things that you may play over and over again, like your node ID. You can use the same application, just give it the -f argument to specify the file. An example of this is when I am creating audio files for playback for functions, like enabling or disabling parrot mode (See my article here). For this I want to create a file called parrot_mode_enabled.ul. I can do this with the following command (note do not add the .ul extension, it get’s added by the application).

$ sodo asl-tts -n <NODE_NUMBER> -t " Parrot Mode On " -f /etc/asterisk/local/parrot_mode_enabled

Leave a Comment

Your email address will not be published. Required fields are marked *