[arm-allstar] File extensions and audio format

Doug Crompton doug at crompton.com
Thu Feb 11 14:09:03 EST 2016


You ask a lot of questions. I will try to answer a few.

On the audio files most all I have checked are 8khz 16 bit. Where are you finding 8 bit?
 soxi /var/lib/asterisk/sounds/node.gsm

Input File     : '/var/lib/asterisk/sounds/node.gsm'
Channels       : 1
Sample Rate    : 8000
Precision      : 16-bit
Sample Encoding: GSM

While I am not aware that Asterisk can handle higher than 8khz files it may be that you can push it a little. I see no reason to do so though. Most of the voice is quite good. Certainly far better than the amateur RF digital crap that some hams seem to be admiring! Here is a good article and a link to a Digium converter you might find useful -

 http://blogs.digium.com/2011/04/19/asterisk-sound-files-101/
  
As for levels. In the past, meaning the current code for the BBB and RPi2 and Acid there has been no way to adjust the level of the telemetry so users often alter the levels of the individual sound files. The saytime script has the level capability built-in and there is a script called change_vol.sh to change the volume of a file. Some have wholesale changed the level of all sound files with a script. This is a crude way to do it but it works.

The update will have two new commands to change telemetry level without modifying any files. The commands are:

telemnomdb <value> and telemduckdb <value>

telemnondb will change the level of the telemetry in dB. Typically you might want the telemetry to be lower by say 6 dB  so the command would be  telemnomdb -6

telemduckdb changes the level when a signal is present. Think of it as idtalkover for voice. The default value is -9 dB

These commands will go in the node section of rpt.conf and can be defined on a per node basis.

So with the 1.3 update for the BBB and RPi2 you will not have to fiddle with sound file volumes anymore.

73 Doug
WA3DSP
http://www.crompton.com/hamradio


From: wb9rsq at gmail.com
To: arm-allstar at hamvoip.org
Date: Thu, 11 Feb 2016 10:54:19 -0600
Subject: [arm-allstar] File extensions and audio format






File extensions and audio format




I know there have been threads on both of these topics but I’m not sure I understand the final advice or the driving policy behind current practice.

First the 1.2.1 image has lots of different script files.

Some are .pl and others are .sh.

There are even a few .py.

I know what they are but there are also lots of files that are BASH scripts but don’t have a .sh extension.

Why in some cases do they have extensions and in others they don’t?

Should they all have extensions?

Next the old audio thing again.

The asterisk sounds folder seems to have .gsm at 8khz 8 bit sampling.

Comments in several .sh files indicate that in order to use CAT you need to have all files formatted the same.

That is obvious but no harm in pointing it out.

However the files for the shutdown and reboot scripts are 8khz 16 bit wave files.

They play just fine through the radio nodes.

In fact I’ve heard 11025 16 bit audio play fine as well.

Yes I can hear the difference in audio quality even over the radio between 8 and 16 bit.

More so with higher sampling rates.

So for some questions.

Where is the 8khz 8 bit limit coming from?

Is it really a limit or just best practice?

Forgetting the space issue is there any reason not to use a 16 bit 8khz or even slightly higher format?

Would ulaw or even wav be a better option for audio under local control?



The saytime script has a line to adjust the volume of the final audio output.

The comment basically reads that negative numbers are lower and to see the sox man page for details.

The script had 1.35 as the value.

Changing it to -1.35 resulted in audio distorted and to loud to be useful at all.

Going above 2.0 seemed to be an upper limit.

Finally 0.0 resulted in silence.

So I came to the conclusion that 0.0 to 2.0 was the effective working range of options.

Is this some kind of multiplying factor based on original audio level?

I typically normalize audio to peak -1.5DB.

I do that before placing audio in the sound libraries.

Would it be better to just normalize to something lower to keep audio in line with other sources of TX audio?

For audio outside my control would it be better to use a sox process to normalize to the rest of my library?

What about just using sox to always normalize anything going out or is the volume change method in the script the best approach?



Any thoughts on these issues would be appreciated.

73







_______________________________________________

arm-allstar mailing list
arm-allstar at hamvoip.org
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar

Visit the BBB and RPi2 web page - http://hamvoip.org 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hamvoip.org/pipermail/arm-allstar/attachments/20160211/557f8b91/attachment.html>


More information about the arm-allstar mailing list