[arm-allstar] Adding a Voice Command Menu for new or visually impaired Hams.

am_fm_radio at yahoo.com am_fm_radio at yahoo.com
Wed May 6 12:51:18 EDT 2020


I put together a SHARI-RPI3 hotspot for a blind Vietnam Veteran ham friend of mine. I figured since neither of us know braille, we'd have to give him a "cheat sheet" so that he could begin to navigate on ALL STAR. This is not an end all solution. But an attempt to add a feature by a crusty-rusty old ham.

I wrote up this exercise so that HAMVIOP.ORG users can adopt my mods into their RPI. I am providing quasi step by step directions, as anyone will want to customize and adopt my mods to make them  their own. For instance, if you or the person you are programming this for, all ready is familiar with the Touch Tone commands, you may not want to speak the ones I have programmed; but for instance only use what I have done to create a Voice menu of macro short cuts. I think the best application of Macros is to use them like I did to connect to various NODES calling them "Short Cuts". 

Now, in my example I have only assigned 4 macros. I am confident 0-9 macro can be assigned as additional line items in rpt.conf. Please note: comment out Macro 1 as it is defective! "1=*81 *80#" as it will ID and speak time at the same time doubling, and sounds awful. 

My concept is to add a text file and edit rpt.conf file.. We used TTcommand.txt to the RPI /etc/asterisk/local, then convert it to a sound file TTcommand.ul. Then EDIT /etc/asterisk/rpt.conf-- adding 4 macros and a new command "C" so when you Touch tone to your Node "*C" it plays the recording of the Command Menu...In my case it takes about 30 seconds. As an after thought, anyone could add a second command "*C1" and link a file, let's say,  macromenu.txt to speak a list of favorite NODE links.

Now let's get down and make the sauce... 

FIRST ITEM OF BUSINESS- 
BEFORE YOU START, play with the white paper "VOICE & TEXT TO SPEECH ON THE RPI2/3" at "https://www2.hamvoip.org/tts-how-to.pdf" 

As a 1st time user I  found playing with it takes about a hour and you can even add a Aussie girl accent to your repeater ID. It requires registering and applying for a KEY but it is free.. Just the right price for any ham. Once you digest that and are confident with creating sound files. Then you may proceed to formulate your own sound menu. You may copy my TTcommand.txt file in its entirety, but please use different macros!! 

One caveat- don't forget that creating text files in /tmp directory is only good to next reboot. In order to test changes in /etc/asterisk/rpt.conf, you must reboot. So I found for ease of future editing, to place TTcommand.txt into the directory /etc/asterisk/local. Work in that director to create TTcommand.ul. You can play your recording as you "massage" it for good enunciation with the following command while in the Bash Shell Interface:

asterisk -rx "rpt localplay <YOUR NODE #> /etc/asterisk/local/TTcommand"

I will use a line of ----------- to delineate my files which were copy and paste.

Here is my TTcommand.txt . There in Commas & Periods are pauses. STAR 5 1 though 4 ARE MACROs - you need to create your own. Actually I alternated back and forth between creating the modified rpt.conf and TTcommand. To arrive at all of this. You decide which is best for you. Just make sure you 1st create rptvirgin.conf before you modify rpt.conf.

 NOTE- adjusted to "speak better". my TTcommand.txt:
------------------------------------------------------
command men you..
Star 1 NODE,,  disconnect node.
Star 2 NODE,,  monitor node.
Star 3 NODE,,  connect node. 
Star 5 1,, short cut 2 K link on W 0 V F W.
Star 5 2,, short cut 2 W 0 V F W repeater V H F.
Star 5 3,, short cut 2 Blind hams Talk Group.
Star 5 4,, short cut 2 W 8 L M shari.
Star 7 0,, Status.
Star 7 1 NODE,, disconnect permanent.
Star 7 2 NODE,, monitor permanent.
Star 7 3 NODE,, connect permanent.
Star 8 0 ,, Station identification.
Star 8 1 ,, twelve hour time.
Star 8 3 ,, twenty four hour time.
Star A 1 ,, Local I P address.
Star A 3 ,, Public I P address.
Star A 9 ,, Parrot 1 time

------------------------------------------------
1. Create TTcommand.txt in /etc/asterisk/local. Use your favorite Text Editor (nano)
2. Convert it to voicerss TTS (tts_audio.sh TTcommand.txt) after a few seconds It will now add TTcommand.ul file to the directory.
3. To make TTcommand.ul speak locally add this to the command line: 

    asterisk -rx "rpt localplay 51673 /etc/asterisk/local/TTcommand" 

Any adjustments you need to make, repeat 1 to 3. 

Once your happy with what you want to say... then comes EDITING /etc/astrisk/rpt.conf

BEFORE YOU DO - DECIDE What your MACROs will do


1. cd /etc/asterisk
2. cp rpt.conf rptvirgin.conf
3. nano rpt.conf

At this point if you are going to use macro's to make "short cuts" to your "favorite NODES", Then add them like I did to rpt.conf.

NOTE - each macro consists of 2 commands. *10 is disconnect then a new node connect *3<NODE> followed by hashtag (#) end of commands. You must disconnect first, then connect, else you would be adding nodes each time you took a short cut. If you are not connected to any node, no problem. . Using the Short Cut *5 is like "Changing Channels on the TV" Get it? Got it? Live it!.

Once you have opened /etc/asterisk/rpt.conf EDIT these lines which are about lines 992-1014 into rpt.conf.

rpt.conf---------------------------------------------------------------------
;B3=cmd,/usr/local/sbin/reboot.sh 51673    ; Reboot the system

B6=cmd,/usr/local/sbin/astres.sh        ; Restart Asterisk

                   ; Update hamvoip with voice feedback
C=cmd,asterisk -rx "rpt localplay 51673 /etc/asterisk/local/TTcommand"     ; say Touchtone Command Menu 
                        
;C2=cmd,/usr/local/sbin/say-hamvoip-sys-update.sh


; MACROS

; Place command macros here

[macro51673]
;Macro number = command string (each command separated by space) -end with HASH
;1=*81 *80#     ; play time and voice ID
1=*10 *346013#  ; connect K-link W0VFW uhf
2=*10 *349403#  ; connect W0VFW vhf
3=*10 *350631#  ; connect Blind Hams Talk Group
4=*10 *3495080# ; connect W8LM

rpt.conf---------------------------------------------------------------------

Changes/ Additions to rpt.conf: are the above Lines starting with:
C=cmd,
;1=*81
1=*10
2=*10
3=*10
4=*10

Once you are satisfied with your edit. ^W to write out your modified rpt.conf file and save it as rpt.conf. 

You must REBOOT your RPI after your changes are saved. Test and if you are happy with your accomplishment- power down, remove the SD card and make a backup on another computer. I personally keep a 2nd micro SD card in a full size SD card holder taped to the top of my RPI case, so that in the event of “NO BOOT” I can load the backup micro SD card and get back on the air pronto. 

Conclusion- Brain smoking? possibly! The beauty of Ham radio is we have an unbelievable pool of experts that find this child’s play. Yet, in my case, it was "The little Engine that could" I think, I can and I did. Hence this DYI paper. If it helps others. That will be great. Still there are unknowns that are not documented about HAMVIOP, RPI and Asterisk.  They require experimentation. Like No where does it say you can have the single character command.. Yet "*C" works. I found that by experimentation. *C gets you a menu to start with. As simple as possible.
 
With Macros. I found unedited Macro 1 "*81 *80#" defective and needs to be commented out. I am only assuming you can assign macro's to *50-*59 as I don’t know if you can use multiple digits to assign macros. Experimentation for another day. 

Regards – 
Larry W8LM  Licensed 54 years
ARRL life member- w8lm at arl.net
VE Team Leader 11 years, VFW post 3115 Amateur Radio Club, WØVFW, Wichita, KANSAS


 




More information about the ARM-allstar mailing list