Just as a followup to Jeremy i tweaked the settings per your explanation to silence -l 1 0.1 1% -1 2.0 1% and its is working absolutely PERFECT for my needs.
It leaves just a tad of silence so speech isn't crammed up that sounds like a auctioneer....
Thank you for the breakdown i really appreciate it....
Since this is running in a script 24x7 i've taken a file from 28 megs to 3.3 megs this will help tremendously for storage and archive purposes
Since this is running in a script 24x7 i've taken a file from 28 megs to 3.3 megs this will help tremendously for storage and archive purposes
Thanks Again!
On Mon, Aug 14, 2017 at 8:15 AM, Jerry Powell <jpowell@xxxxxxxx> wrote:
Ok makes sense I'll try it out
Thanks JeremyOn Sat, Aug 12, 2017 at 7:22 AM, Jeremy Nicoll - ml sox users <jn.ml.sxu.88@wingsandbeaks.org.uk > wrote:On 2017-08-10 01:34, Jerry Powell wrote:
I am trying to remove the silence from script generated mp3's but not ALL
silence (otherwise it all gets crammed up) can someone break this command
down to me? Please i have read the man page and i just cant wrap my mind
around it...I've searched and searched google just cant get it
The file has a slight buzz to it
silence -l 1 0.1 1% -1 2.0 5%
I am guessing, as I have never used this effect.
But, the manual says the form of the command is
silence [−l] above-periods [duration threshold[d|%]
[below-periods duration threshold[d|%]]
so first:
- you HAVE specified the optional -l
which affects how 'below-periods' works
- then: above-periods [duration threshold[d|%] is: 1 0.1 1%
and: below-periods duration threshold[d|%] is: -1 2.0 5%
Starting with the 'above-periods' part: 1 0.1 1%
that means above-periods is 1
duration is 0.1
threshold is 1%
So sox will scan from the start of the audio file looking just once (as
above-periods is 1) for an audio signal that is sufficiently more loud than
'silence' to decide that that's the start of the sound you want.
The 'louder than totally silent' audio will have to be more than (duration)
0.1 in length to be regarded as significant. But... 0.1 what? The manual
says that
duration is a time specification with the peculiarity that a bare
number is interpreted as a sample count, not as a number of seconds.
For specifying seconds, either use the t suffix (as in ‘2t’) or
specify minutes, too (as in ‘0:02’).
I imagine you did not mean 0.1 samples. I expect you probably meant this
value to be 0.1t (for a tenth of a second), or something else?
That 'louder than silent' concept also needs to be defined - how much louder?
Your 1% means 1% of the loudest that the sound can get (I think it's not
entirely clear if sox examines the whole audio file first to find out what its
maximum actual loudness is, or whether it simply means the loudest signal that
could theoretically be stored in the file).
You also specified: below-periods duration threshold[d|%] is: -1 2.0 5%
so below-periods is -1
duration is 2.0
threshold is 5%
AND the original -l switch was specified.
The same comments as above apply to your duration (probably you meant 2t) and
threshold.
Because your below-periods value is -1 (ie negative) this means you want sox to
look for periods of 'silence' in the middle of the file. I /think/ but am not
certain that here it would look for only one such period (because your -1 is
numerically 1 once it is made positive).
Because you specified the initial -l switch, periods of 'silence' found in the
middle of the file do not get totally removed. Instead they are shrunk so that
any that is longer than the duration value you provided would be replaced by a
shorter bits of 'silence' (of that duration) - or putting it another way, the
first small part of the 'silence' is kept and the rest thrown away. If you'd
coded duration properly it might do what you want.
Remember, I'm only guessing!
--
Jeremy Nicoll - my opinions are my own
------------------------------------------------------------ ------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Sox-users mailing list
Sox-users@xxxxxxxxxxxxxxxxxxxxt
https://lists.sourceforge.net/lists/listinfo/sox-users
------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________ Sox-users mailing list Sox-users@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/sox-users