|
From: Fmiser <fm...@gm...> - 2010-05-13 08:37:30
|
> Michael Gargiullo wrote: > My goal is to record our squad scanner and have to have an > individual file for each "transmission". After 5 seconds of > silence a new file should be created. > > I've tried a few things I've found on the web, but nothing > seems to work. It starts recording slience, but never stops. > I think I have a low background hum, but not sure. I think then all you need to do is change the threshold value. What is the command you are using now? And what version of SoX are you using? What operating system is this on? >From the man page: silence [-l] above-periods [duration threshold[d|%] [below-periods duration threshold[d|%]] Threshold is used to indicate what sample value you should treat as silence. If you have a new enough version, try something like: rec -r 24000 TX.ogg silence 1 0.10 1% 1 5.0 1% : newfile : restart This will make a collection of files starting with "TX001.ogg". After the word "silence" is two sets of three numbers. These sets determine the "squelch" behavior. The first set of three is the "turn on", and the second three "turn off". The first number is 1. Read the man page and ponder to learn of when to use anything else. Next is "0.10". This is the length in seconds. In this situation it doesn't really seem to matter what the value is. Third is "1%". This is the threshold. A bigger number sets the threshold higher. Like turning up the squelch knob clockwise on anything but a Bearcat scanner, the bigger the number the louder the signal has to be to considered non-silence. That's the first set of three. The second set are the same functions but for "turn off". Here the time value matters. "5.0" means the file will not increment until it's been silent for 5.0 seconds. -- Philip |