[arm-allstar] my idea for an enhanced parrot

Patrick Perdue borrisinabox at gmail.com
Tue Mar 29 22:58:21 EDT 2022


Hi:

I was recently made aware of a Brandmeister talkgroup (3120610) which, 
rather than parroting audio, gives you a report of your audio level. As 
best I can tell, it has five levels of granularity -- I couldn't hear 
anything, low, normal, high, and critical. I thought it might be fun to 
try doing this in HamVoIP. I'm aware of some flaws that could make it 
less useful than in a strictly digital environment, but I want to try it 
anyway, combining it with a parrot and playback of good, baseline audio 
level as a comparison.

My idea was to have Asterisk do a one-shot recording, save it to 
/tmp/something, then either read it raw or convert to wave, then analyze 
it with sndfile-info, which conveniently is already in HamVoIP, and grep 
for the highest peak. Based on what the peak is, play a file, then 
parrot, or not, depending on a switch. Not sure about what thresholds to 
use for the various levels, but I'll figure that out later if I get that 
far. I also want nothing at all to happen if a transmission is shorter 
than, say, 1 second.

I realize that the peak doesn't tell the whole story. For example, if 
most of the audio is quiet, except for one loud plosive, then your audio 
is loud, regardless. If you have a noisy signal, where the noise is 
louder than your audio, that could throw things off too. This is why I 
want to also include the ability to parrot the audio back, or just 
provide an audio level report, with each of these things switchable.

So, basically, I want to know if there is a way to hijack the buffer 
from parrot without actually parroting, or if there is another way to 
cause app.rpt to only record the active call/transmission such that it 
can be further processed. I remember that parrot stores it's audio 
somewhere in /tmp, but not sure about much else.

If anyone else wants to play, feel free to steal this idea. It's free.

Any help is appreciated.

73

N2DYI



More information about the ARM-allstar mailing list