sox-users@lists.sourceforge.net unofficial mirror
 help / color / mirror / code / Atom feed
* Sox silence Breakdown
@ 2017-08-10  0:34 Jerry Powell
  2017-08-12 11:22 ` Jeremy Nicoll - ml sox users
  0 siblings, 1 reply; 6+ messages in thread
From: Jerry Powell @ 2017-08-10  0:34 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1: Type: text/plain, Size: 410 bytes --]

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%

-l=
1 =
0.1=
1%=

-1=
2.0=
5%=

Thank You in advance
-Jerry

[-- Attachment #1.2: Type: text/html, Size: 596 bytes --]

[-- Attachment #2: Type: text/plain, Size: 202 bytes --]

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sox silence Breakdown
  2017-08-10  0:34 Sox silence Breakdown Jerry Powell
@ 2017-08-12 11:22 ` Jeremy Nicoll - ml sox users
  2017-08-14 12:15   ` Jerry Powell
  0 siblings, 1 reply; 6+ messages in thread
From: Jeremy Nicoll - ml sox users @ 2017-08-12 11:22 UTC (permalink / raw)
  To: sox-users

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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sox silence Breakdown
  2017-08-12 11:22 ` Jeremy Nicoll - ml sox users
@ 2017-08-14 12:15   ` Jerry Powell
  2017-08-15  2:42     ` Jerry Powell
  0 siblings, 1 reply; 6+ messages in thread
From: Jerry Powell @ 2017-08-14 12:15 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1: Type: text/plain, Size: 4075 bytes --]

Ok makes sense I'll try it out
Thanks Jeremy

On 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@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users
>

[-- Attachment #1.2: Type: text/html, Size: 5288 bytes --]

[-- Attachment #2: Type: text/plain, Size: 202 bytes --]

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sox silence Breakdown
  2017-08-14 12:15   ` Jerry Powell
@ 2017-08-15  2:42     ` Jerry Powell
  2017-08-15  8:01       ` Jeremy Nicoll - ml sox users
  0 siblings, 1 reply; 6+ messages in thread
From: Jerry Powell @ 2017-08-15  2:42 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1: Type: text/plain, Size: 4762 bytes --]

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
Thanks Again!

On Mon, Aug 14, 2017 at 8:15 AM, Jerry Powell <jpowell@neeko.us> wrote:

> Ok makes sense I'll try it out
> Thanks Jeremy
>
> On 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@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/sox-users
>>
>
>

[-- Attachment #1.2: Type: text/html, Size: 6231 bytes --]

[-- Attachment #2: Type: text/plain, Size: 202 bytes --]

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sox silence Breakdown
  2017-08-15  2:42     ` Jerry Powell
@ 2017-08-15  8:01       ` Jeremy Nicoll - ml sox users
  2017-08-15 18:58         ` Jerry Powell
  0 siblings, 1 reply; 6+ messages in thread
From: Jeremy Nicoll - ml sox users @ 2017-08-15  8:01 UTC (permalink / raw)
  To: sox-users

On 2017-08-15 03:42, Jerry Powell wrote:
> 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.

Well, that's good.  But, are you saying you didn't change either of the
'duration' values?

-- 
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@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Sox silence Breakdown
  2017-08-15  8:01       ` Jeremy Nicoll - ml sox users
@ 2017-08-15 18:58         ` Jerry Powell
  0 siblings, 0 replies; 6+ messages in thread
From: Jerry Powell @ 2017-08-15 18:58 UTC (permalink / raw)
  To: sox-users


[-- Attachment #1.1: Type: text/plain, Size: 1011 bytes --]

Well as the script runs its still having issues i'm still testing to see
what the problem is....I'll get back to you and let you know what i find
out....


On Tue, Aug 15, 2017 at 4:01 AM, Jeremy Nicoll - ml sox users <
jn.ml.sxu.88@wingsandbeaks.org.uk> wrote:

> On 2017-08-15 03:42, Jerry Powell wrote:
>
>> 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.
>>
>
> Well, that's good.  But, are you saying you didn't change either of the
> 'duration' values?
>
>
> --
> 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@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/sox-users
>

[-- Attachment #1.2: Type: text/html, Size: 1852 bytes --]

[-- Attachment #2: Type: text/plain, Size: 202 bytes --]

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

[-- Attachment #3: Type: text/plain, Size: 158 bytes --]

_______________________________________________
Sox-users mailing list
Sox-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sox-users

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-08-15 18:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-10  0:34 Sox silence Breakdown Jerry Powell
2017-08-12 11:22 ` Jeremy Nicoll - ml sox users
2017-08-14 12:15   ` Jerry Powell
2017-08-15  2:42     ` Jerry Powell
2017-08-15  8:01       ` Jeremy Nicoll - ml sox users
2017-08-15 18:58         ` Jerry Powell

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/sox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).