[arm-allstar] HamVoIP scripts and non-GSM sound files

Doug Crompton wa3dsp at gmail.com
Sun Apr 19 01:32:22 EDT 2020


The extent is never specified when calling an Asterisk sound file.
Therefore any file type will play that is available and proper. I would
have to check and see what the order is but if you had all file types in
one directory it would play in a certain order. Thus 1.wav, 1.gsm, 1.ul,
1.sln assuming they were all the proper data rate for Asterisk would all
play as just the file name 1. Scripts other than the ID making script on
Hamvoip obviously follow this Asterisk rule and do not have an extent
specified when playing. Others like the weather script concatenate GSM
files to create one long file that is played. The way Asterisk currently
works you really need to do it this way or otherwise risk the possibility
of things getting out of order.. This is also the way it is done in the
playnews program where it is played in ulaw file segments. Personally I see
no problem with the gsm files. Most hams today listen to crap digital audio
and GSM is an order of magnitude above that in quality. Most could not
really tell the difference between a UL file and a gsm file played through
the most common radio, a handheld with a 1" speaker!. Any filetype that is
used must be able to be concatenated easily. GSM files fit this category
others would possibly need sox to do that and this would make the scripts
more complex. Again I will say you are completely free to do whatever you
want on your own system. We have looked at many available alternatives and
none are that great unless you pay fairly big bucks for them. You might
have better commercial stuff available since you probably need it in your
situation but in most cases it is not legal to play it on the radio or
distribute it. For awhile several years ago we had a great free TTS through
Google until they turned it off. At the moment the only way you are going
to get quality TTS is to pay for it and that would be on an individual
basis. But given the fact that so many listen to digital audio they can't
even understand maybe that does not matter! The grass is always greener on
the other side of the street!

*73 Doug, WA3DSP*
*http://wa3dsp.org <http://wa3dsp.org>*

On Sun, Apr 19, 2020 at 1:02 AM "Patrick Perdue via ARM-allstar" <
arm-allstar at hamvoip.org> wrote:

> Yes, we've been through all this before. My point is, with some effort,
> which, by the way, I am happy to contribute to, regardless of one's
> preference, sound file will just work. I've personally been asked by
> many hams about what it would take to replace Allison on their personal
> HamVoIP systems and repeaters running HamVoIP as a controller. There are
> sound packs out there already that are license/restriction free, and I
> intend to create more, but, with HamVoIP, it's not just as simple as
> replacing the directory, as for the most part, these files are not in
> .gsm format. One has to also look through all the scripts in
> /usr/local/sbin, and replace those extensions across the board. I wrote
> a script that does this in a loop using sed. This must be done with
> every HamVoIP update if you are using anything but gsm, making it far
> less easy to just slip a replacement sound pack in, since these scripts
> refer to them directly. Anything played using app.rpt without extension
> specified will work fine, but the scripts that concatenate files before
> playing will, of course, fail if those files don't exist.
>
>
> On 4/18/2020 2:57 PM, "Doug Crompton via ARM-allstar" wrote:
> > Let me just further comment on this. We are not in the sound file
> business.
> > Everyone has a like or dislike or preference for certain formats and
> > voices. There are many many ways to create voice playable on Hamvoip.
> Some
> > are free and some are cost. We do not support cost formats because most
> do
> > not want to pay and in some cases the cost is rather high. Free stuff is
> > out there and you can always use your own voice or someone you know.
> > Grabbing demo stuff is another way although we do not condone that. The
> > bottom line is we cannot satisfy everyone in this regard. The Asterisk
> > voices are there to use. If you want to use something else you can. If
> > something else becomes popular we could offer it as an alternative in the
> > future. Also with all this talk about dedicated commercial repeater
> > controllers vs. Hamvoip there is no comparison in the audio formats,
> > availability, and ease of use being many orders of magnitude better in
> > Hamvoip.
> >
> > *73 Doug, WA3DSP*
> > *http://wa3dsp.org <http://wa3dsp.org>*
> >
> >
> > On Sat, Apr 18, 2020 at 2:43 PM Doug Crompton <wa3dsp at gmail.com> wrote:
> >
> >> Patrick,
> >>
> >>     I doubt this is ever going to happen. Each sound format has its own
> >> pluses and minues. There is a conversion program offered to convert
> several
> >> formats to Ulaw - convert_audio.sh in our distribution. This converts
> gsm,
> >> signed linear, and wav to ulaw. The help screen is shown below. Format
> >> conversion is also available at a number of online sites and even
> Asterisk
> >> itself in the client has audio conversion capability. We all create
> sound
> >> files in different ways just like we all program in different ways. You
> are
> >> completely allowed to do whatever you want in that regard. If you don't
> >> like the format the sound files are in they can be converted or they are
> >> available in different formats directly from Digium or other sites for
> >> download.
> >>
> >> # convert_audio.sh
> >>
> >>   Convert wav file to Asterisk/Allstar formats
> >>
> >>     convert_audio.sh <input file.wav> [output_filename]
> >>
> >>     Input file must be .wav, output file is input filename.ul, .gsm, or
> sln
> >>     unless different second parameter filename is given.
> >>
> >> *73 Doug, WA3DSP*
> >> *http://wa3dsp.org <http://wa3dsp.org>*
> >>
> >> On Sat, Apr 18, 2020 at 1:30 PM "Patrick Perdue via ARM-allstar" <
> >> arm-allstar at hamvoip.org> wrote:
> >>
> >>> Hi all:
> >>>
> >>> It occurs to me that, if you, like myself, use sound files that are not
> >>> in .gsm format, lots ofHamVoIP specific scripts will not work.
> >>>
> >>> It could be, and has been argued that we should all just use GSM,
> >>> because it's smaller, and everything is already set up for that, but
> >>> some things, like the RC-850 sound pack, really just sound better, even
> >>> over the tinniest of HT's, in ulaw format.
> >>>
> >>> Thus, I propose a change to the HamVoIP scripts that play sound files
> to
> >>> the node so that, no matter if your sounds are gsm, ulaw or sln, that
> >>> they will continue to work without having to do a wholesale
> find/replace
> >>> of .gsm to.ulaw or .sln, which reverts every time a HamVoIP update
> >>> happens.
> >>>
> >>> I'm not the greatest shell scripter out there, but basically, I would
> do
> >>> something like this...
> >>>
> >>> Look for a specific base filename (without extension) in
> >>> /var/lib/asterisk/sounds/rpt. Let's use connected as an example.
> Extract
> >>> the file extension of connect.gsm or connected.ulaw, which ever is in
> >>> the path, and export as a variable, say, $extn. Then, instead of
> >>> localplay /var/lib/asterisk/sounds/rpt/connected.gsm, localplay
> >>> /var/lib/asterisk/sounds/rpt/connected.$extn. This export of file
> >>> extension as a variable could be done for each script individually, or
> >>> with a one-time run script that runs at boot, or maybe when Asterisk is
> >>> loaded. Of course, this assumes that every sound file in
> >>> /var/lib/asterisk/sounds/rpt is in the same format as every other file
> >>> in /var/lib/asterisk/sounds, so it isn't necessarily fool-proof.
> >>>
> >>> Just an idea.
> >>>
> >>> _______________________________________________
> >>>
> >>> 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
> _______________________________________________
>
> 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