[arm-allstar] HamVoIP scripts and non-GSM sound files
Doug Crompton
wa3dsp at gmail.com
Sat Apr 18 14:43:17 EDT 2020
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
>
More information about the ARM-allstar
mailing list