Automatically generating voice alerts in Mac OS X

ersky9xr is the port of the er9x firmware to the 9XRPRO radio.
Post Reply
User avatar
iFeghali
Posts: 46
Joined: Sun Jul 29, 2018 2:19 am
Country: Brazil

Automatically generating voice alerts in Mac OS X

Post by iFeghali » Wed Aug 15, 2018 1:44 am

Inspired by this topic http://openrcforums.com/forum/viewtopic.php?f=64&t=6871 I decided to create a bash script that makes use of Mac OS X text to speech capabilities to automatically generate voice alert files.

I am basically using 3 tools to generate the WAV file required by ersky9xr r221:
  • say: converts text into speech (aiff file)
  • afconvert: converts aiff to wav file
  • dd: binary manipulation of wav file
The whole thing, currently in alpha state, is available at https://github.com/ifeghali/ersky9xutils


# Create Voice File
say -v "$VOICE" "$phrase" -o $FAIFF -r $WPM

# Convert AIFF to WAV
afconvert -f WAVE -d [email protected]$FREQ -c 1 $FAIFF $FWAVE

# Convert wav offset from 4096 to 44
dd if=$FWAVE bs=1 count=35 of=$FOUTF >&/dev/null
dd if=$FWAVE bs=1 skip=4087 seek=35 conv=notrunc of=$FOUTF >&/dev/null


User avatar
jhsa
Posts: 19020
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Automatically generating voice alerts in Mac OS X

Post by jhsa » Wed Aug 15, 2018 8:11 am

If you have access to a windows computer just download and install "TTSautomate". It will build your pack for you in seconds :)

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW

Post Reply

Return to “ersky9xr”