[arm-allstar] voice announcements

Dave Petrie wa2kjc at gmail.com
Sat Oct 30 20:29:53 EDT 2021


I'm not sure how to run this using tts_audio.sh
The way I have done it is to create a text file and then tts_audio.sh
sometext.txt
and i get the sometext.ul file
it requires a separate sometext.txt file for each transaction using
tts_audio.sh which
uses voicerss.org site and I am very happy with the results.
so how to i streamline the huge lines of text to run one at a time and
produce the ul file

Dave

On Sat, Oct 30, 2021 at 7:23 PM "Patrick Perdue via ARM-allstar" <
arm-allstar at hamvoip.org> wrote:

> I got rid of Allison on day 2 of having a working Allstar node.
>
> I wrote a script to do this using a local voice, in my case, one of the
> ones from Mac OS, since it uses bash, and has a pretty reasonable voice
> selection. However, I got slapped pretty good when I suggested ways to
> create and distribute these a couple of years ago. My (very dirty) bash
> script reads line-by-line from a vertical bar delimited text file in a
> while loop, containing the prompt to be spoken on column 1, and the
> output path (relative to current directory) of the file, minus
> extension. It then passes each line separately to the Mac OS Say
> command, including voice name, speed, volume, etc. which writes to .aiff
> format. These are later converted to ulaw with SoX. SoX also trims the
> audio on either side to make it extremely responsive, combined with the
> much faster voice I use. It's about three times faster than Allison. You
> probably wouldn't want something this fast on a repeater, but as a blind
> screen reader user, I'm used to very fast speech.
>
> This script is all pretty unwieldy and unrefined, and I want to do
> something better at some point. I wrote it for my own use, and it
> worked, if only just. The Say command could be substituted for any other
> CLI TTS application, including voicerss, I suppose.
>
> Interesting note: the voicerss American English voices are just renamed
> versions of some of the Microsoft voices that ship with Windows 10. For
> example, John is really David, Mike is Mark, etc.
>
>
> I'm not sure what the voicerss.org API limitations are for a free
> account, but my hand written text file has 446 entries in it. I included
> some files that I don't think are strictly necessary for app.rpt,
> including all 50 U.S. state names. Asterisk itself has lots of files
> that aren't used by app.rpt, so I didn't generate static files for those.
>
> Now, you might think it's cool to have every prompt in ulaw format. I
> certainly do, because it sounds better. HamVoIP has lots of hard-coded
> .gsm references in scripts, so, on my systems, I have to do a bunch of
> finding and replacing to make it all work. Sure, GSM files are a lot
> smaller, but even people I know who aren't audiophiles can tell the
> difference on an HT speaker.
>
> Here is everything I manually wrote down, and fed to my bash script. The
> third column is just a boundary, because I ran into some weird problem
> with the way I formatted things in the script.
> It is assumed that the referenced directories in column 2 preceding the
> file name exist under /var/lib/asterisk/sounds/
>
> Warning! Inactivity timeout.|/rpt/act-timeout-warning|
> All links disconnected.|/rpt/alllinksdisconnected|
> All links restored.|/rpt/alllinksrestored|
> Auto patch on.|/rpt/autopatch_on|
> Connecting.|/rpt/callproceeding|
> Call terminated.|/rpt/callterminated|
> Connected.|/rpt/connected|
> connecting.|/rpt/connecting|
> Connection failed.|/rpt/connection_failed|
> down|/rpt/down|
> fast|/rpt/fast|
> frequency,|/rpt/frequency|
> Good afternoon.|/rpt/goodafternoon|
> Good evening.|/rpt/goodevening|
> Good morning.|/rpt/goodmorning|
> high power.|/rpt/hipwr|
> Incoming call, on|/rpt/in-call|
> Invalid frequency.|/rpt/invalid-freq|
> Keyed for|/rpt/keyedfor|
> Latitude|/rpt/latitude|
> Local monitor.|/rpt/localmonitor|
> Please log in to node.|/rpt/login|
> Longitude|/rpt/longitude|
> Low power.|/rpt/lopwr|
> Macro busy.|/rpt/macro_busy|
> Macro not found.|/rpt/macro_notfound|
> Medium power.|/rpt/medpwr|
> Memory not found.|/rpt/memory_notfound|
> minus|/rpt/minus|
> monitor|/rpt/monitor|
> Node|/rpt/node|
> off|/rpt/off|
> on|/rpt/on|
> plus|/rpt/plus|
> quick|/rpt/quick|
> Remote already in this mode.|/rpt/remote_already|
> Remote busy.|/rpt/remote_busy|
> Disconnected!|/rpt/remote_disc|
> By your command,|/rpt/remote_go|
> Repeat only.|/rpt/repeat_only|
> Please hold for a few moments, and your call will be connected if there
> is someone there to answer. Thank |you.|/rpt/revpatch-intro|
> Sorry. Nobody was able to answer your call at this
> time.|/rpt/revpatch-noanswer|
> pl decode|/rpt/rxpl|
> seconds|/rpt/seconds|
> simplex|/rpt/simplex|
> site normal.|/rpt/sitenorm|
> slow|/rpt/slow|
> stop.|/rpt/stop|
> The temperature is,|/rpt/thetemperatureis|
> The time is,|/rpt/thetimeis|
> The voltage is,|/rpt/thevoltageis|
> The wind is,|/rpt/thewindis|
> Timeout.|/rpt/timeout|
> Warning! System timeout in,|/rpt/timeout-warning|
> Tranceive|/rpt/tranceive|
> PL encode.|/rpt/txpl|
> Unauthorized transmit frequency.|/rpt/unauthtx|
> Unkeyed for,|/rpt/unkeyedfor|
> up|/rpt/up|
> version,|/rpt/version|
> 0|/digits/0|
> 1|/digits/1|
> 2|/digits/2|
> 3|/digits/3|
> 4|/digits/4|
> 5|/digits/5|
> 6|/digits/6|
> 7|/digits/7|
> 8|/digits/8|
> 9|/digits/9|
> 10|/digits/10|
> 11|/digits/11|
> 12|/digits/12|
> 13|/digits/13|
> 14|/digits/14|
> 15|/digits/15|
> 16|/digits/16|
> 17|/digits/17|
> 18|/digits/18|
> 19|/digits/19|
> 20|/digits/20|
> 30|/digits/30|
> 40|/digits/40|
> 50|/digits/50|
> 60|/digits/60|
> 70|/digits/70|
> 80|/digits/80|
> 90|/digits/90|
> eh m|/digits/a-m|
> at,|/digits/at|
> Sunday|/digits/day-0|
> Monday|/digits/day-1|
> Tuesday|/digits/day-2|
> Wednesday|/digits/day-3|
> Thursday|/digits/day-4|
> Friday|/digits/day-5|
> Saturday|/digits/day-6|
> dollars|/digits/dollars|
> first|/digits/h-1|
> second|/digits/h-2|
> third|/digits/h-3|
> fourth|/digits/h-4|
> fifth|/digits/h-5|
> sixth|/digits/h-6|
> seventh|/digits/h-7|
> eighth|/digits/h-8|
> ninth|/digits/h-9|
> tenth|/digits/h-10|
> eleventh|/digits/h-11|
> twelvth|/digits/h-12|
> thirteenth|/digits/h-13|
> fourteenth|/digits/h-14|
> fifteenth|/digits/h-15|
> sixteenth|/digits/h-16|
> seventeenth|/digits/seventeenth|
> eighteenth|/digits/h-18|
> nineteenth|/digits/h-19|
> twentieth|/digits/h-20|
> thirtieth|/digits/h-30|
> hundred|/digits/hundred|
> million|/digits/million|
> minus|/digits/minus|
> January|/digits/mon-0|
> February|/digits/mon-1|
> March|/digits/mon-2|
> April|/digits/mon-3|
> May|/digits/mon-4|
> June|/digits/mon-5|
> July|/digits/mon-6|
> August|/digits/mon-7|
> September|/digits/mon-8|
> October|/digits/mon-9|
> November|/digits/mon-10|
> December|/digits/mon-11|
> o'clock|/digits/oclock|
> o|/digits/o|
> PM.|/digits/p-m|
> pound|/digits/pound|
> star|/digits/star|
> thousand|/digits/thousand|
> today|/digits/today|
> tomorrow|/digits/tomorrow|
> yesterday|/digits/yesterday|
> A|/letters/a|
> quote|/letters/ascii34|
> dollar sign|/letters/ascii36|
> percent|/letters/ascii37|
> ampersand|/letters/ascii38|
> tick|/letters/ascii39|
> open parenthesis|/letters/ascii40|
> close parenthesis|/letters/ascii42|
> comma|/letters/ascii44|
> colon|/letters/ascii58|
> semi-colon|/letters/ascii59|
> less than|/letters/ascii60|
> greater than|/letters/ascii62|
> question mark|/letters/ascii63|
> left bracket|/letters/ascii91|
> backslash|/letters/ascii92|
> right bracket|/letters/ascii93|
> carrot|/letters/ascii94|
> underscore|/letters/ascii95|
> back tick|/letters/ascii96|
> left brace|/letters/ascii123|
> pipe|/letters/ascii124|
> right brace|/letters/ascii125|
> til de|/letters/ascii126|
> asterisk|/letters/asterisk|
> at|/letters/at|
> b|/letters/b|
> c|/letters/c|
> d|/letters/d|
> dash|/letters/dash|
> dollar|/letters/dollar|
> dot|/letters/dot|
> e|/letters/e|
> equals|/letters/equals|
> bang|/letters/exclamation-point|
> f|/letters/f|
> g|/letters/g|
> h|/letters/h|
> i|/letters/i|
> j|/letters/j|
> k|/letters/k|
> l|/letters/l|
> m|/letters/m|
> n|/letters/n|
> o|/letters/o|
> p|/letters/p|
> plus|/letters/plus|
> q|/letters/q|
> r|/letters/r|
> s|/letters/s|
> slash|/letters/slash|
> space|/letters/space|
> t|/letters/t|
> u|/letters/u|
> v|/letters/v|
> w|/letters/w|
> x|/letters/x|
> y|/letters/y|
> z|/letters/z|
> zed|/letters/zed|
> niner|/phonetic/9_p|
> alpha|/phonetic/a_p|
> bravo|/phonetic/b_p|
> charlie|/phonetic/c_p|
> delta|/phonetic/d_p|
> echo|/phonetic/e_p|
> foxtrot|/phonetic/f_p|
> golf|/phonetic/g_p|
> hotel|/phonetic/h_p|
> india|/phonetic/i_p|
> juliet|/phonetic/j_p|
> kilo|/phonetic/k_p|
> lima|/phonetic/l_p|
> mike|/phonetic/m_p|
> november|/phonetic/n_p|
> oscar|/phonetic/o_p|
> papa|/phonetic/p_p|
> quebec|/phonetic/q_p|
> romeo|/phonetic/r_p|
> sierra|/phonetic/s_p|
> tango|/phonetic/t_p|
> uniform|/phonetic/u_p|
> victor|/phonetic/v_p|
> wiskey|/phonetic/w|
> x-ray|/phonetic/x_p|
> yankey|/phonetic/y_p|
> zulu|/phonetic/z_p|
> around,|/wx/around|
> barometer|/wx/barometer|
> ceiling|/wx/ceiling|
> dew point,|/wx/dew-point|
> falling|/wx/falling|
> feet|/wx/feet|
> foot|/wx/foot|
> gust|/wx/gust|
> gusting to,|/wx/gusting-to|
> gusts|/wx/gusts|
> gusty|/wx/gusty|
> heat index,|/wx/heat-index|
> humidity,|/wx/humidity|
> inch|/wx/inch|
> inches|/wx/inches|
> kilometer|/wx/kilometer|
> large|/wx/large|
> meter|/wx/meter|
> mist|/wx/mist|
> northeast|/wx/northeast|
> northwest|/wx/northwest|
> percent|/wx/percent|
> point|/wx/point|
> rising|/wx/rising|
> southeast|/wx/southeast|
> southwest|/wx/southwest|
> steady,|/wx/steady|
> temperature,|/wx/temperature|
> wind chill|/wx/wind-chill|
> winds|/wx/winds|
> address|/address|
> weather|/weather|
> is at,|/is-at|
> to?|/to|
> degrees|/degrees|
> Access denied.|/access-denied|
> Access granted.|/access-granted|
> alabama|/alabama|
> alaska|/alaska|
> alert!|/alert|
> arizona|/arizona|
> arkansas|/arkansas|
> barometric|/barometric|
> bearing|/bearing|
> box|/box|
> california|/california|
> cancelled|/cancelled|
> celsius|/celsius|
> clouds|/clouds|
> cloudy|/cloudy|
> colorado|/colorado|
> connecticut|/connecticut|
> connecting!|/connecting|
> Connection failed!|/connection-failed|
> Connection timed out.|connection-timed-out|
> cyclone|/cyclone|
> date|/date|
> day|/day|
> daylight|/daylight|
> days|/days|
> delaware|/delaware|
> disconnected!|/disconnected|
> easterly|/easterly|
> eastern|/eastern|
> east|/east|
> enabled.|/enabled|
> evening|/evening|
> fahrenheit|/fahrenheit|
> falling|/fahrenheit|
> feet|/feet|
> florida|/florida|
> fog|/fog|
> foggy|/foggy|
> freeze|/freeze|
> freezing|/freezing|
> frequency|/frequency|
> from|/from|
> gale|/gale|
> georgia|/georgia|
> gigahertz|/gigahertz|
> gmt|/gmt|
> goodbye.|/goodbye|
> hawaii|/hawaii|
> heading|/heading|
> hello!|/hello|
> hello world!|hello-world|
> hertz|/hertz|
> high|/high|
> hours|/hours|
> humidity|/humidity|
> hurricane|/hurricane|
> ice|/ice|
> icy|/icy|
> idaho|/idaho|
> illinois|/illinois|
> indiana|/indiana|
> invalid|/invalid|
> iowa|/iowa|
> is|/is|
> kansas|/kansas|
> kentucky|/kentucky|
> kilohertz|/kilohertz|
> kilometer|/kilometer|
> kilometers-per-hour|/kilometers-per-hour|
> lightning|/lightning|
> Los Angeles|/los-angeles|
> louisiana|/louisiana|
> low|/low|
> machine|/machine|
> maine|/maine|
> maryland|/maryland|
> massachusetts|/massachusetts|
> maximum|/maximum|
> megahertz|/megahertz|
> memory|/memory|
> meter|/meter|
> meters|/meters|
> michigan|/michigan|
> midnight|/midnight|
> miles|/miles|
> miles-per-hour|/miles-per-hour|
> minimum|/miles-per-hour|
> minnesota|/minnesota|
> minute|/minute|
> minute|/minutes|
> mississippi|/mississippi|
> missouri|/missouri
> misty|/missouri|
> monitor!|/monitor|
> Montana|Montana|
> morning|/morning|
> mostly|/mostly|
> mountain|/mountain|
> nautical-miles|/nautical-miles|
> near|/near|
> nevada|/nevada|
> new hampshire|/new-hampshire|
> New Jersey|/new-jersey|
> New Mexico|/new-mexico|
> New York|/new-york|
> north|/north|
> North Carolina|/north-carolina|
> North Dakota|/north-dakota|
> northerly|/northerly|
> oklahoma|/oklahoma|
> ohio|/ohio|
> off|/off|
> on|/on|
> oregon|/oregon|
> patchy|/patchy|
> pennsylvania|/pennsylvania|
> point?|/point|
> Public IP address,|/public-ip-address|
> rain|/rain|
> rainfall|/rainfall|
> rainy|/rainy|
> range|/range|
> received|/received|
> receiving|/receiving|
> reception|/reception|
> remote base|/remote-base|
> The remote is already in this mode.|/remote-already-in-this-mode-2|
> Remote already in this mode!|/remote-already-in-this-mode|
> repeater|/repeater|
> repeat only|/repeat-only|
> restarting|/restarting|
> rhode island|/rhode-island|
> rising|/rising|
> scattered|/scattered|
> second|/second|
> seconds|/seconds|
> simplex|/simplex|
> slow|/slow|
> slowly|/slowly|
> snow|/snow|
> snowing|/snowing|
> snowy|/snowy|
> software|/software|
> south|/south|
> South Carolina|/south-carolina|
> South Dakota|/south-dakota|
> southerly|/southerly|
> station|/station|
> status|/status|
> storm|/storm|
> sun|/sun|
> sunny|/sunny|
> system|/system|
> systems|/systems|
> temperature|/temperature|
> tennessee|/tennessee|
> texas|/texas|
> thunderstorm|/thunderstorm|
> tide|/tide|
> time|/time|
> times|/times|
> unavailable|/unavailable|
> units|/units|
> utah|/utah|
> variable|/variable|
> vermont|/vermont|
> virginia|/virginia|
> visibility|/visibility|
> warning!|/warning|
> was|/was|
> washington|/washington|
> watch|/watch|
> weather station|/weather-station|
> welcome|/welcome|
> west|/west|
> westerly|/westerly|
> West Virginia|west-virginia|
> wind|/wind|
> windy|/windy|
> wisconsin|/wisconsin|
> wyoming|/wyoming|
>
> On 10/30/2021 12:56 PM, "Dave Petrie via ARM-allstar" wrote:
> > Just curious if there is a script or file that is in text format for all
> > the voice recordings. My thought is to run a long text file, which I have
> > done with no problem on the tts conversion using voicerss.org and change
> > the voice and when the conversion is complete and downloaded put the
> > separate files back in the proper place in hamvoip. Just for info, my
> > duplexer tuning document is 2 pages of text and i converted it in less
> than
> > 15 seconds and then it took 8 minutes and 32 seconds to play, so I don't
> > see a problem with making new files, I just don't know how to streamline
> > the effort, I understand I could pick and choose the file and replace it,
> > that will take forever but can be done.
> > I Don't want anyone falling asleep here, that's why I come up with ideas
> > now and then.
> > Thanks
> > Dave
> > _______________________________________________
> >
> > ARM-allstar mailing list
> > ARM-allstar at hamvoip.org
> > http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
> >
> > Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
> _______________________________________________
>
> ARM-allstar mailing list
> ARM-allstar at hamvoip.org
> http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
>
> Visit the BBB and RPi2/3/4 web page - http://hamvoip.org


More information about the ARM-allstar mailing list