If the original wav file is not limited to -6 dBfs (minus 6 dB relative to full scale) you can reduce the level "on the fly" by using the lower case "v" for volume control. For example, this reduces the volume to half what it was (-0.5) sox -v -0.5 -t raw -U -c 1 -r 8000 (etc...) 73 Ken
-----Original Message----- From: Angelo Glorioso [mailto:n5uxt@hotmail.com] Sent: Monday, August 05, 2013 10:39 PM To: Ken Subject: Re: uLaw playback
Hi Ken,
Thanks for your reply. I was able to find the syntax for sox. It worked great. It took my wav file and converted it over to ulaw. I used :
sox -V n5uxt.wav -r 8000 -c 1 -t ul -w n5uxt.ulaw
It was simple and fast.
73, Angelo
----- Original Message ----- From: "Ken" <ke2n@cs.com> To: <app_rpt-users@ohnosec.org> Cc: "'Angelo Glorioso'" <n5uxt@hotmail.com> Sent: Monday, August 05, 2013 7:54 PM Subject: uLaw playback
I have read where uLaw produces 14 bit audio (-8159 to +8158 numerically-speaking) - see Wikipedia on this, for example.
I am guessing this is the range of numbers used by app_rpt.
Your 16-bit WAV format is going to produce +/- 32768 (numerically- speaking again).
So - you need to divide the WAV output by a factor of 4 to get into the range that uLaw supports.
The tutorial on using Audacity for app_rpt: http://images.ohnosec.org/app-rpt-audacity.pdf says to normalize at -6dB.
You really need to follow that advice to get clean audio.
"Normalize" will set the loudest sound to the amplitude you select. If there are a lot of sound "spikes" in the audio track, you can end up with a pretty low average sound level. I have found the best way to fix this is some judicious use of the Audacity "hard limiter" function. It really does not damage the sound quality, when used within reason.
73
Ken