Skip to content

Harnesses AWS Polly API to generate voice announcements for two-way radios.

Notifications You must be signed in to change notification settings

santiagon610/aws-polly-radiochannels

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Polly Radio Channel Annunciation Creator

What is this?

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.

How do I use it?

Requirements

  • 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)

Getting Started

  • 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.

How does it work?

  • 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.

I have the files, now what?

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.

Supported Radios / Software

  • 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)

About

Harnesses AWS Polly API to generate voice announcements for two-way radios.

Resources

Stars

Watchers

Forks

Languages