Today I fiddled a little bit to generate custom voice files compatible to the 9XR PRO using command line speech synthesis and command line format adaption on my Mac. Everything can be done in one script and no interaction (e.g. converting with Audacity) is required. The script is a little redundant but easier to understand that way.
Side note: I have not managed to find a 9XR PRO compatible format string for the say command. I use sox for the adaption, its free, lives in the command line and things like Audacity are also depending on it.
Addendum: Linux/Unix users might have to adapt things for the use of espeak instead of the say command for synthesis.
Maybe this would be useful to include in the respective manual for the 9XR PRO.
Prerequisites
- You are using a serious OS (Unixoid like OS X or Linux). If your OS is rather funny (e.g. Win), feel free to add your solution or nag someone to run your script for you.
- You have the "say" command installed (default on OS X, others eventually check their packet managers)
- You have the chosen voice installed (check the respective system prefs on your Mac, I chose and installed Samantha)
- On a Mac, you have homebrew installed. Google for the one command line installation instruction if not.
- Install the program "sox" for the 9XR PRO compatible PCM format adaption. On a mac, thats . Others check their packet managers.
Code: Select all
brew install sox
- Create a new script file and make it executable.
Code: Select all
touch script.sh && chmod +x script.sh
- Edit your script file and include the following:
Code: Select all
#!/bin/sh # My model 1 say -v samantha -o 0261_temp.wav --data-format=I16@22050 "MCPX" sox 0261_temp.wav -t wavpcm -e signed-integer 0261.wav # My model 2 say -v samantha -o 0262_temp.wav --data-format=I16@22050 "Flame wheel 450" sox 0262_temp.wav -t wavpcm -e signed-integer 0262.wav # Add further tuples for each one of your models. The voice indices 0261 to 0399 should be available for custom messages. # Remove temp files rm 0*_temp.wav
- Run your script.sh
Code: Select all
./script.sh
- Transfer the generated files to your SD card (card reader is less painful).
- Set up each model with the respective voice index.
- You could also regenerate and replace other voice files from the voice file index list in no time...
- Have a beer.
Thanks for reading, yell at me for improvements/corrections and feel free to add your solution.