how to use Truncate Silence
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.1.x version.
The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.1.x version.
The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.
how to use Truncate Silence
what's the meaningof "Min silence duration","Max silence duration","silence compression"?
Re: how to use Truncate Silence
Good question. I believe this version of Truncate Silence is new in 1.3.8 and has not yet been documented. Also there were some diffuculties with it in 1.3.8 that were supposedly corrected, see here.kfzhs wrote:what's the meaningof "Min silence duration","Max silence duration","silence compression"?
When I generated a DTMF tone, then ran Truncate Silence, the resulting silences were of differing lengths, so I suspect somethings is amiss. I'll send an email to the developers - I believe they are working on a related bug fix now. In the meantime, I believe it does work properly in 1.3.7.
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: how to use Truncate Silence
John, those aren't the default parameters. Tone duration and silence duration depend on the sequence and the duration chosen. On a fresh cfg, the sequence is "audacity" and duration is 1 second which gives a tone duration of 72ms and silence duration of 59 ms. You would have to tell me what sequence and duration you are using for me to test those parameters, but using default truncate silence parameters on an "audacity" DTMF sequence of 30 seconds length (which gives a tone duration of 2185 ms and silence duration of 1788 ms), the truncated silences were of equaljademan wrote:(sent to feedback:@)
On Windows, XP HE SP3, I used Audacity 1.3.9 to Generate DTMF tones with
the following default settings:
55% duty ratio
3278 ms tone duration
2682 ms silence duration
amplitude .8
I then ran Truncate Silence with the default settings of 200, 1000, 4,
-40. After I did this, I measured the resulting silences between the
tones. The first three silences were: 404 ms, 659 ms, 820 ms
respectively. One might expect them all to be the same.
length in 1.3.9 and 1.3.10 Alpha.
However, then I added labels and I could find unequal truncation. Then I could find unequal truncation after clearing to a fresh project and truncating a DTMF tone without labels. Please try with one track in 1.3.9 and give me your exact sequence and duration. Try it with and without labels.
Gale
Last edited by Gale Andrews on Fri Apr 24, 2015 3:13 pm, edited 4 times in total.
Reason: Truncation appeared after using labels, then seemed to be there even without labels
Reason: Truncation appeared after using labels, then seemed to be there even without labels
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Re: how to use Truncate Silence
Gale,
You were right. I have an error of omission. I had changed the DTMF time duration to 45 seconds. This may be why you could not duplicate the numbers.
OK, here is what I did:
1) In audacity.cfg, deleted all lines except:
NewPrefsInitialized=1
2) Started Audacity 1.3.9
3) Language=English
4) Welcome: OK
5) Generate > DTMF Tones
6) Duration: 45 seconds
7) OK
8) Effect > Truncate Silence > OK
9) Here the periods of silence between the tones are visibly different, increasing slowly in size.
10) Up to this point, no labels are involved.
11) First 4 interval durations (I created labels to measure them):
404 ms
659 ms
820 ms
820 ms
Total number of intervals: 7.
Length of last interval: 820ms
Total clip length: 31.39 seconds.
7 intervals.
Anyway, these results are identical to my previous tests, which is the original problem report.
Gale, when I repeat the test using labels, where do you want me to put the labels ?
You were right. I have an error of omission. I had changed the DTMF time duration to 45 seconds. This may be why you could not duplicate the numbers.
OK, here is what I did:
1) In audacity.cfg, deleted all lines except:
NewPrefsInitialized=1
2) Started Audacity 1.3.9
3) Language=English
4) Welcome: OK
5) Generate > DTMF Tones
6) Duration: 45 seconds
7) OK
8) Effect > Truncate Silence > OK
9) Here the periods of silence between the tones are visibly different, increasing slowly in size.
10) Up to this point, no labels are involved.
11) First 4 interval durations (I created labels to measure them):
404 ms
659 ms
820 ms
820 ms
Total number of intervals: 7.
Length of last interval: 820ms
Total clip length: 31.39 seconds.
7 intervals.
Anyway, these results are identical to my previous tests, which is the original problem report.
Gale, when I repeat the test using labels, where do you want me to put the labels ?
-
billw58
- Forum Staff
- Posts: 5565
- Joined: Wed Aug 12, 2009 2:10 am
- Operating System: macOS 10.15 Catalina or later
Re: how to use Truncate Silence
I can report identical results (within 2 or 3 ms) on Mac with 1.3.10-alpha-Oct 19 2009.jademan wrote: OK, here is what I did:
...
First 4 interval durations
404 ms
659 ms
820 ms
820 ms
-- Bill
Re: how to use Truncate Silence
Does anybody have information on the cause of these short periods of silence in a recorded track. The sound monitored on the speakers while recording does not contain this annoying silence periods. I'm using Audacity 1.3.9 with Windows XP.
Re: how to use Truncate Silence
WCC,WCC wrote:Does anybody have information on the cause of these short periods of silence in a recorded track. The sound monitored on the speakers while recording does not contain this annoying silence periods. I'm using Audacity 1.3.9 with Windows XP.
From your description, it is hard to tell what you are talking about. As Steve would say, "If the file is less than 50MB, could you upload the file onto the internet somewhere and post a link. http://www.sendspace.com/ is pretty good (and free)." When you do this, please start a new thread, as this sounds like a different subject. Also, when you repost, please include your OS, and Audacity version. Are you running 1.2.6 or 1.3.9 ? Also, how did you make your recording ? Many Thanks.
Re: how to use Truncate Silence
Gale,
I repeated the above tests with label tracks. I placed 8 labels in seemingly random locations, but I put individual labels on tones and on silent spots. After applying Truncate Silence, I seemed to have the identical discrepancies to the waveform as in the above test. When the label track was not linked, the label track was not changed. When the label track was linked, the label track was truncated. The labels did not move with the waveform, as I might have expected. Note that I did not record or verify the label locations with great accuracy.
I repeated the above tests with label tracks. I placed 8 labels in seemingly random locations, but I put individual labels on tones and on silent spots. After applying Truncate Silence, I seemed to have the identical discrepancies to the waveform as in the above test. When the label track was not linked, the label track was not changed. When the label track was linked, the label track was truncated. The labels did not move with the waveform, as I might have expected. Note that I did not record or verify the label locations with great accuracy.
-
Gale Andrews
- Quality Assurance
- Posts: 41761
- Joined: Fri Jul 27, 2007 12:02 am
- Operating System: Windows 10
Re: how to use Truncate Silence
John, it's a known P3 bug that truncate silence doesn't keep labels in synchronisation. It seems the fact that adding a label track causing unequal truncation was some kind of aberration. Almost always, I can replicate unequal truncation with a 30 seconds "audacity" DTMF followed by default truncation. One other time too, it produced equal silences of 596 ms. Every other time it produced silences of 596ms but the third one much shorter at 408ms.jademan wrote:Gale,I repeated the above tests with label tracks. I placed 8 labels in seemingly random locations, but I put individual labels on tones and on silent spots. After applying Truncate Silence, I seemed to have the identical discrepancies to the waveform as in the above test. When the label track was not linked, the label track was not changed. When the label track was linked, the label track was truncated. The labels did not move with the waveform, as I might have expected. Note that I did not record or verify the label locations with great accuracy.
The changes to Truncate have not yet been user-documented. In the previous Truncate, there was only one setting (Max silence duration) that determined the resultant length of silence after truncation. Now there are three settings which as far as I can see mutually interact both with each other and with the length of the silence itself to produce the resultant silence. As you will note from the examples above, the default settings do not give a resultant silence of 1000 ms, even if you applied it to a single silence. The resultant silence can be less or more than the max silence figure.
The "compression" factor increases the amount of truncation beyond the amount that the effect would otherwise produce, a value of "1" (to 1) not changing the result and the default "4" making the silence four times as short. Because the compression operates on both the min and max values the results are quite complex.
Imagine 10 seconds of silence in a 30 seconds track:
Settings of min 100, max 5000 give you:
compression 1: 5s
compression 2: 5s
compression 4: 2.5s
compression 10: 1s
Settings of min 2000, max 5000 give you:
compression 1: 6.888s
compression 2: 6.888s
compression 4: 5.416s
compression 10: 4.499s
Settings of min 2001, max 2001 give you:
compression 1: 3.889 seconds
Settings of min 1, max 2001 and min 1000, max 2001 both give you:
compression 1: 2.000 s
compression 4: 529 ms (why not 500)?
I've given examples of max settings of 2001ms because there is a definite bug: Truncate will give you 1 ms less than the silence you ask for, except in the case where you ask for 1ms where it will give you "approximately" 1ms.
I've found one group of settings that I believe will always give you the resultant truncation you ask for in the max silence input (including in DTMF and other tracks with multiple silences):
Min Silence: 1ms
Max Silence: <your required silence> + 1ms (so if you want 10ms, put 11ms here)
Silence compression: 1
I've measured resultant silences by Edit > Detach at Silences and snapping the selection to the whitespace between clips. I'm not a mathematician, so I've asked Phil (the author) if he can drop by and comment on the above findings, in particular the 529/500 ms discrepancy in the last example above, and whether the unequal truncation is expected in the scenarios quoted. If it helps, Phil quotes the maths as follows:
(output) = ((min) + (input - min)/compression) with the constraint that output < max
Phil gave a use case for the new features as follows:
"As an example, you can set the minimum to 100 ms, the maximum to 5000 ms, and the compression factor to 4:1, and it will have the result of about a 2x speedup in speech with no pitch change, and keeping about the same cadence as the original."
That may be useful as a specialist case, however for more basic users I am concerned that the defaults in most cases will not give you the max silence requested (nor will setting compression to "1" always give the requested value). If the "+1 second" issue can be addressed and if my conclusion is right, I suggest "min silence:1, max silence:1000, compression:1" should be the defaults.
Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Re: how to use Truncate Silence
Gale, when I originally reviewed your reply, I was confused, because although you covered the material, it wasn't apparent that you were responding directly to the complaint, or to Bill's verification that the identical problem occurs on a MAC:Gale Andrews wrote:John, it's a known P3 bug that truncate silence doesn't keep labels...jademan wrote:Gale,I repeated the above tests...
jademan wrote:...
OK, here is what I did:
1) In audacity.cfg, deleted all lines except:
NewPrefsInitialized=1
2) Started Audacity 1.3.9
3) Language=English
4) Welcome: OK
5) Generate > DTMF Tones
6) Duration: 45 seconds
7) OK
8) Effect > Truncate Silence > OK
9) Here the periods of silence between the tones are visibly different, increasing slowly in size.
10) Up to this point, no labels are involved.
11) First 4 interval durations (I created labels to measure them):
404 ms
659 ms
820 ms
820 ms
Total number of intervals: 7.
Length of last interval: 820ms
Total clip length: 31.39 seconds.
7 intervals...
The problems that we have measured do not seem to be related at all to label tracks. When, at your request, I have used labels in conjunction with truncate, what I have noticed is the labels are not moved at all. Instead, some are simply deleted.billw58 wrote:I can report identical results (within 2 or 3 ms) on Mac with 1.3.10-alpha-Oct 19 2009.jademan wrote:...
404 ms
659 ms
820 ms
820 ms
-- Bill
But enough on labels. Again, labels are not related to the problems we are reporting.
Without using labels, I am also able to reproduce this problem. The 1.788ms silence is reduced to 596ms, but on the third it is 408ms.Gale Andrews wrote:...Almost always, I can replicate unequal truncation with a 30 seconds "audacity" DTMF followed by default truncation. One other time too, it produced equal silences of 596 ms. Every other time it produced silences of 596ms but the third one much shorter at 408ms.
When I tried sandwiching a 10s silence between two 10s tones, I got in your first case:Gale Andrews wrote:...
Imagine 10 seconds of silence in a 30 seconds track:
Settings of min 100, max 5000 give you:
compression 1: 5s
compression 2: 5s
compression 4: 2.5s
compression 10: 1s
Settings of min 2000, max 5000 give you:
compression 1: 6.888s
compression 2: 6.888s
compression 4: 5.416s
compression 10: 4.499s
Settings of min 2001, max 2001 give you:
compression 1: 3.889 seconds
Settings of min 1, max 2001 and min 1000, max 2001 both give you:
compression 1: 2.000 s
compression 4: 529 ms (why not 500)? ...
4.999s, 4.999s, 2.574, 1.089s
in the second case:
6.888s, 6.888s, 5.416s, 4.499s
In the third case:
3.889
and in the fourth case:
2.000s, 1.279s.
Thank you for this tip. This has proven to be helpful to me.Gale Andrews wrote:...
I've measured resultant silences by Edit > Detach at Silences and snapping the selection to the whitespace between clips.
Yes. This helps. So inputs that are shorter in length than min are ignored (left alone). And inputs that are longer than min are compressed but only by the extent that they exceed the minimum (ignore) length. And the output is not to exceed the maximum specified.Gale Andrews wrote:...
I'm not a mathematician, so I've asked Phil (the author) if he can drop by and comment on the above findings, in particular the 529/500 ms discrepancy in the last example above, and whether the unequal truncation is expected in the scenarios quoted. If it helps, Phil quotes the maths as follows:
(output) = ((min) + (input - min)/compression) with the constraint that output < max
However, since it is not intuitively obvious, don't you think this formula should be posted on the Truncate Silence Parameter screen ?
Perhaps also because the whole objective of this new algorithm is to compress the spaces, do you think the compression factor should be specified first, then the minimum and maximum?
This leaves the question of why you get 529ms, I get 1.279s, and why our 30s and 45s DTMF tones silence periods don't match the formula. And there was another case (which is why i sandwiched) where a leading silence interval was unaltered altogether.
In any case, I feel much more comfortable about this whole routine now. I'll be anxious to hear what Phil has to say.