This is a tool that programmatically creates channel name announcements for two-way radios. Though, I guess you could use it for elevators or anything else that need to create a number of canned messages through automation.
- YouTube: My Kenwood NX-5800 flipping through channels, with prompts generated by this script.
- A Linux system or similar environment (WSL, Docker container, whatever) that can run
bash
scripts. - Amazon Web Services account with access to Polly
- AWS CLI
- SoX (on my Fedora system, available via
dnf
)
-
Sign up for an account at Amazon Web Services. We'll be using their APIs and command line interface to generate the sythesized voice files. Most of what we're doing falls within their free tier, so there should be no cash coming out of your pocket for this.
-
Make sure that you have an active AWS session by running
aws sts get-caller-identity
. You should get back, at minimum, a JSON document that shows your UserId, Account, and ARN.{ "UserId": "123456789012", "Account": "123456789012", "Arn": "arn:aws:iam::123456789012:root" }
- If this does not render similar to above, or provide you with output that shows that you have a valid AWS session, stop here and fix your AWS CLI credentials.
-
Populate the channels.txt file with the prompts that you want generated.
-
Run the build.sh script to reach out to AWS and create your prompts.
- The script looks at each line of the channels.txt file for its prompt name.
- On each line, the script calls AWS Polly to generate the prompt as an Ogg Vorbis file, and downloads it into the output OGG directory.
- The script then calls SOX to convert the Ogg Vorbis files to a format compatible with most two-way radios and PBXes (16-bit WAV, 8000Hz, monaural, little endian), and then places those files into the output WAV directory.
This is going to be radio-specific, but depending on your radio programming software, you will need to create a voice profile or configuration file. In that screen, you will upload and import your WAV files, and you can assign them to the individual channels, zones, functions, or the like.
- Motorola APX CPS (tested on APX 8500)
- Kenwood KPG-D1N (tested on NX-5300 and NX-5800)
- Harris Radio Personality Manager (tested on XG-100P)
- Harris Radio Personality Manager 2 (tested on XL-200P)