Minimum length mod for Silence Marker and Sound Finder

Using Nyquist scripts in Audacity.
Post and download new plug-ins.

If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like

Re: Minimum length mod for Silence Marker and Sound Finder

Permanent link to this post Posted by steve » Tue May 18, 2010 6:22 pm

i like the KISS principle :)

Gale Andrews wrote:it's not totally unlike a pop album with a starting "silence" then a number of equal length tracks divided by equal length silences. Counting backwards means the user won't export the first track on the album unless they "include audio before first label".

Yes they would.

Counting forward: initial label is placed just before end of first silence (just before the start of the track). The next label will be placed just before the start of the next track provided that the length of the first track is equal or greater than the minimum distance (default = 0).

Counting backward: The "next" label is somewhere after the end of the first track (it doesn't matter where), and the initial label will be placed in the same place as for counting forward, provided that the song is equal or greater than the minimum distance (default=0).

The case where you get no track export without selecting "include audio before first label" is if there is no silence before the first track (which is the same counting forward, backward, or with the SilenceFinder.ny as currently shipped). The only exception is if the first track is really short AND the user has set the minimum length to a very large value (longer than the track length).

Is it not logical that if:
1) you have a really short track at the beginning
and
2) you set the minimum length to less than the track length
that
there will be no label for the track?

(I'll reply to the other points later - gotta go now)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45650
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Minimum length mod for Silence Marker and Sound Finder

Permanent link to this post Posted by Gale Andrews » Tue May 18, 2010 7:24 pm

stevethefiddle wrote:
Gale Andrews wrote:it's not totally unlike a pop album with a starting "silence" then a number of equal length tracks divided by equal length silences. Counting backwards means the user won't export the first track on the album unless they "include audio before first label".

Yes they would.

Counting forward: initial label is placed just before end of first silence (just before the start of the track). The next label will be placed just before the start of the next track provided that the length of the first track is equal or greater than the minimum distance (default = 0).

Counting backward: The "next" label is somewhere after the end of the first track (it doesn't matter where), and the initial label will be placed in the same place as for counting forward, provided that the song is equal or greater than the minimum distance (default=0).

The case where you get no track export without selecting "include audio before first label" is if there is no silence before the first track (which is the same counting forward, backward, or with the SilenceFinder.ny as currently shipped). The only exception is if the first track is really short AND the user has set the minimum length to a very large value (longer than the track length).


In the case where all the (album) tracks are about the same length, which really isn't uncommon, then yes I can get an initial label just before the end of the first silence if I set minimum distance at less than the length of the first track. But then I may as well turn the control off because I will get one label per track anyway.

stevethefiddle wrote:Is it not logical that if:
1) you have a really short track at the beginning and
2) you set the minimum length to less than the track length

that there will be no label for the track?



Yes - in the sense that we have a label preceding that track which does not define only that track. That is true for both forwards and backwards counting in the case of a track in the middle that is shorter than minimum distance. It's true for forwards counting in the case of a first track that is shorter than minimum. It breaks for backwards counting in the case of a first track below minimum distance because there is no label at all for it. That looks asymmetrical to me.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Gale Andrews
Quality Assurance
 
Posts: 26089
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Minimum length mod for Silence Marker and Sound Finder

Permanent link to this post Posted by steve » Tue May 18, 2010 9:44 pm

Gale Andrews wrote:I can get an initial label just before the end of the first silence if I set minimum distance at less than the length of the first track. But then I may as well turn the control off because I will get one label per track anyway.

Absolutely - and that's why I strongly feel that the default for minimum length should be zero. In cases such as this the minimum length is not required at all.

If we go back to Daga's original user case:
I have needed to split long speeches into tracks so that they are CD-friendly. Several existing plugins allow for this but there is no minimum length on the tracks.

Suppose that the speaker interacts with someone from the audience for a couple of minutes. Most silence-finding plugins would result in several dozen tracks during this relatively short exchange. In order to rectify the situation, we need the ability to define a minimum track length to go along with all of the other options.

http://www.epicvoyage.org/node/55

The purpose of the minimum length feature is so as to avoid having a whole bunch of 10 second tracks on the CD.
The modified Silence Finder achieves this result.
Setting the minimum length between labels to say 30 seconds will ensure that if there is a bunch of short audio clips, they will be grouped together into sections of 30 seconds or more. However, it also raises the interesting questions of:
a) what to do with beginning and the end of the track
b) what to do with any "left over" short clips after grouping according to the minimum length setting.

Regarding the final label:
If there is trailing silence at the end of the Audacity track, there will be a final label after the last bit of audio. The label time for the final label is the time the silence began plus the silence duration target. This is exactly the same in the modified version as it is in the original Silence Finder. Although this means that an extra (silent) file is exported, I think it must have been considered to be a necessary evil so that the final track of real audio did not get left with a long period of silence at the end. I've not heard any complaints about this, so I would suggest that we leave it as it is (unless we want to actually truncate the track - do we want to go there?).

Gale Andrews wrote:if we need to count backwards, I think there has to be an option to count forwards. And we're then going to need a help screen/file to explain the cases where one behaviour would be better than the other.

I see the logic, but dread the prospect of having to explain the cases :)
I'm struggling to see a good case (other than the logic case) for counting forward.

Gale Andrews wrote:Can we make all those assumptions you were making? Personally I actually like a bit of shuffling and final silences penetrated by final coughs before a live track starts. It sets the scene, builds expectation and gives me time to start concentrating.

I'm not happy about making assumptions, but I think that we do need to consider user cases and then decide how to handle the detail based on what is likely to be most useful for users.

The amount of lead in before the start of a track is set using the "Label Placement" setting. The wording in Silence Finder ""Label Placement [seconds before silence ends]" is equivalent to ""Label Placement [seconds before next non-silence begins]", but perhaps you would like to suggest alternative wording?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45650
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Minimum length mod for Silence Marker and Sound Finder

Permanent link to this post Posted by Gale Andrews » Wed May 19, 2010 8:08 pm

stevethefiddle wrote:
Gale Andrews wrote:I can get an initial label just before the end of the first silence if I set minimum distance at less than the length of the first track. But then I may as well turn the control off because I will get one label per track anyway.

In cases such as this the minimum length is not required at all.


I can't agree there, unless Daga's use case is the only one to be considered. I can easily see a case where we have a LP/tape transfer, silence at the start then nine (more or less) three-minute tracks each separated by a couple of seconds' silence. User wants to e-mail them as MP3s but there is a limit of 3 MB per e-mail. Or, this is a compilation album and every three tracks are by a different artist. So,they want to make three groups. If we have backwards counting, user can't make three groups of those tracks without having the first label at the end of the first track, so AFAICT can't get what they want to do out-of-the-box. This seems quite a fundamental objection to me.

Backwards counting also gives us a grouping that puts longer non-silence at the start of the exportable region. This is quite possibly good for the Daga use case. It personally doesn't suit me so well because I want some shuffling and coughs at the start of my live track. I can certainly move the "label placement" back, though that isn't going to always suit elsewhere if I have to set it to 5 seconds + as seems likely. I could equally suggest we have forwards counting and allow the marker to be placed after the end of the silence :)

stevethefiddle wrote:Regarding the final label: If there is trailing silence at the end of the Audacity track, there will be a final label after the last bit of audio. The label time for the final label is the time the silence began plus the silence duration target. This is exactly the same in the modified version as it is in the original Silence Finder. Although this means that an extra (silent) file is exported, I think it must have been considered to be a necessary evil so that the final track of real audio did not get left with a long period of silence at the end. I've not heard any complaints about this, so I would suggest that we leave it as it is (unless we want to actually truncate the track - do we want to go there?)


I fully agree that the final label is good when "minimum duration" is off, as in current Silence Finder. My issue with it is entirely about when minimum duration is on. If there isn't any silence at the end of the track, then the user gets an "odd" exported length (shorter than the minimum duration specified) at the end. This is in addition to the "odd" length at the start. I know you would say "hang on, it only says minimum distance between labels", but I can definitely see cases here where the last label will not give users what they want.

stevethefiddle wrote:The amount of lead in before the start of a track is set using the "Label Placement" setting. The wording in Silence Finder ""Label Placement [seconds before silence ends]" is equivalent to ""Label Placement [seconds before next non-silence begins]", but perhaps you would like to suggest alternative wording?


Wording is clear enough I think, even for adjusting for backwards counting (unless we do allow labels to be placed after the silence).

Am I right in thinking we could forward count without damaging Daga's use case if you tried to implement your "intelligent grouping" ("Don't split shorter than [seconds]")? Any other suggestions? I do feel fairly strongly at the moment in favour of "forwards counting" because I think the "backwards counting" live recording use cases are more "power user" things where users may be able to understand and make adjustments more easily.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Gale Andrews
Quality Assurance
 
Posts: 26089
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Minimum length mod for Silence Marker and Sound Finder

Permanent link to this post Posted by steve » Wed May 19, 2010 10:28 pm

Gale Andrews wrote:I can easily see a case where we have a LP/tape transfer, silence at the start then nine (more or less) three-minute tracks each separated by a couple of seconds' silence. User wants to e-mail them as MP3s but there is a limit of 3 MB per e-mail. Or, this is a compilation album and every three tracks are by a different artist. So,they want to make three groups. If we have backwards counting, user can't make three groups of those tracks without having the first label at the end of the first track, so AFAICT can't get what they want to do out-of-the-box. This seems quite a fundamental objection to me.

I don't get this at all.

3 minutes of audio at 128kbps = 2.7 MB, so that means splitting between each song (minimum distance = 0)

The practical case:
User wants to group songs in 3's and each song about 3 minutes - that would require setting the minimum distance to about 8 minutes, but the user would need to look at each track length to that they set the minimum length greater than the sum of two adjacent songs and less than the sum of 3 adjacent songs. That's fine as long as all of the songs are about the same length, but falls down if say "song 4" and "song 5" have a combined length of 7 mins 59 seconds and there is a 3 second gap between them. OK, so we set minimum distance to 8 mins 30 seconds, but then what if songs 1, 2 and 3 are all a bit less than 3 minutes?

What if there are 4 songs by one artist, 2 songs by another and 3 by a third artist?

It can be changed, but the minimum distance setting only goes up to 100 seconds.

The reason that I thought that having any sort of minimum distance control is to counter situations that would generate a bunch of really short tracks. What you are suggesting here is quite different and in my opinion is not workable.

The theoretical case:
9 songs, each are close to 3 minutes, 4 seconds silence at the beginning, 4 seconds silence at the end, 3 seconds silence between song.
The user wants 3 groups of songs.
Minimum distance set to 8 minutes:

Counting forward: ("MMM" = music, "----" = silence, "|" = label)

----|-MMM---MMM---MMM--|-MMM---MMM---MMM--|-MMM---MMM---MMM-|---

Counting backward:

----|-MMM---MMM---MMM--|-MMM---MMM---MMM--|-MMM---MMM---MMM-|---

Draw - There is no difference!



Same scenario but with no silence at the beginning:

Counting forward: ("MMM" = music, "----" = silence, "|" = label)

MMM--|-MMM---MMM---MMM--|-MMM---MMM---MMM--|-MMM---MMM----

Counting backward:

MMM---MMM---MMM--|-MMM---MMM---MMM--|-MMM---MMM---MMM-|---

Counting backward wins!




Same scenario but with silence at the beginning and no silence at the end:

Counting forward: ("MMM" = music, "----" = silence, "|" = label)

---|-MMM---MMM---MMM--|-MMM---MMM---MMM--|-MMM---MMM---MMM

Counting backward:

----MMM---MMM--|-MMM---MMM---MMM--|-MMM---MMM---MMM--|-MMM

Counting forward wins!




Same scenario but with no silence at the beginning or the end:

Counting forward: ("MMM" = music, "----" = silence, "|" = label)

MMM--|-MMM---MMM---MMM--|-MMM---MMM---MMM--|-MMM---MMM

Counting backward:

MMM---MMM--|-MMM---MMM---MMM--|-MMM---MMM---MMM--|-MMM

Draw!



Even with "intelligent grouping" there will be pros and cons - for example, if there is one short track between two long tracks, should it be grouped with the long track before it, or the long track after it? We have no way of knowing which the user would prefer and the user will probably want it one way for one recording and the opposite way for another. We can't even assume that having an option of "group previous/group post" will help because of situations where the user would like the grouping to be:

MMMMMMMMMMM---M--|-NNNNNNNNNNNN--|-M---MMMMMMMMMMMM

In situations like this the best practical advice would probably be to add labels on all silences (minimum distance = 0) and delete the unwanted labels manually.



Basically the choice comes down to:
A) ....MMMMMMMMMMM---M--|-NNNNNNNNNNNN---M--|-MMMMMMMMMMMM....
B) ....MMMMMMMMMMM--|-M---NNNNNNNNNNNN--|-M---MMMMMMMMMMMM....
C) ....MMMMMMMMMMM--|-M--|-NNNNNNNNNNNN--|-M--|-MMMMMMMMMMMM....

(and option C is always available)
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45650
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Minimum length mod for Silence Marker and Sound Finder

Permanent link to this post Posted by Gale Andrews » Thu May 20, 2010 9:06 pm

Yes, in my "nine tracks in three groups" example, the user was supposed to be exporting at 32 kbps (or the size limit was larger). :)

If my example (assuming silence at beginning and end, which I think will always be the most common case) had eight songs instead of nine, then "backwards counting" would "lose" in the sense that the user would have to "include audio before first label". Forwards counting can never "fail" in that way with a starting silence.

We introduced "Regular interval labels" because of very significant demand for segmenting recordings into larger, more or less equal groups. I appreciate this wasn't the original use case for "minimum distance", but I think it's inevitable people will try and use it that way, even though as you point out forwards or backwards can both "win" if you start removing one or both of the initial/final silences. What's driving me is trying to get the best result for what I think is the most useful case where people are trying to split fairly evenly spaced songs into fairly regular groups with an initial and final silence.

stevethefiddle wrote:
Basically the choice comes down to:
A) ....MMMMMMMMMMM---M--|-NNNNNNNNNNNN---M--|-MMMMMMMMMMMM....
B) ....MMMMMMMMMMM--|-M---NNNNNNNNNNNN--|-M---MMMMMMMMMMMM....
C) ....MMMMMMMMMMM--|-M--|-NNNNNNNNNNNN--|-M--|-MMMMMMMMMMMM....

(and option C is always available)


I think "intelligent grouping" with a "group previous"(A)/"group following"(B) option sounds good. I'm fine with (A) being default (better for the Daga use case) if any case with initial silence always produces a label at the end of that initial silence. If people want "previous" and "following" in the same track, they should use (C) then some other solution.

As to the "last label" question when "minimum distance" is on, that is less important to me, though in the context of people who do want "fairly regular splits" I still think it's worth considering. Maybe it depends how the final interface looks too.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Gale Andrews
Quality Assurance
 
Posts: 26089
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Minimum length mod for Silence Marker and Sound Finder

Permanent link to this post Posted by Daga » Tue Jun 08, 2010 8:35 am

stevethefiddle wrote:Given the above scenario, it is likely that the first part of the recording will be duff (while the audience is chatting before the speaker begins) and the user is probably going to want that first label, so I think "Minimum distance between labels" is a good idea. If the user does not want the first label, it is very easy for them to delete it.


Sorry, I didn't mean to ignore this for so long. Despite our speech etiquette, there are still times when questions are asked in the middle of a lecture. If the speaker is good, he will generally repeat the question before he answers it. This was one of the major cases that I was trying to save myself a dozen tracks on.

Gale Andrews wrote:I'd like to see Daga's input here, but I'm fine too that the first label (meaning after time zero) should appear even if the distance from the start to the first label is less than the "minimum distance" setting. I'd be reasonably happy with that even if the tin said "minimum track length", because the default is not to export before the first label.

I have used a commercial program in the past that split the recording into tracks as it recorded. The formula was simple. It would start a track and wait the minimum amount of time before it began to monitor for a silence long enough to start the next track. After we were finished, we had to edit and crop the relevant files.

For the sake of decibel correction and uploads to websites, it is very nice to have this as one long track. There are also issues with changes between speakers (one guest speaker had a 20-minute and 15-minute track because he rarely paused for 2 full seconds). Tools exist to raise the volume of all tracks for a CD, and a batch (or Bash) script can be written to concatenate .MP3 files, but that adds complexity and I am not always around. Some of the others who handle the recording are not able to manage as many steps in the process.

Some of the others who are recording would be fine with regular intervals but I don't really like the tracks to be split mid-word. Mid-sentence is a little fuzzy.

Basically, I manually choose the beginning and end of the recorded segment. If we need other assumptions for the general users then that is fine. Hopefully this provides a good overview of what I hope to accomplish. :)

That is an interesting discussion about whether we should count forward or back. In the case of a speech, there is not a whole lot to worry about. If perfect placement were a requirement then I would have to do it by hand. I have considered a weight algorithm to bias the labels somewhere between between regular intervals and larger silences. It would not be the picture-perfect implementation of KISS principles.
Daga
 
Posts: 3
Joined: Fri May 14, 2010 5:09 am
Operating System: Please select

Re: Minimum length mod for Silence Marker and Sound Finder

Permanent link to this post Posted by Gale Andrews » Tue Jun 08, 2010 4:45 pm

Thanks, Daga. I pushed Steve's modification to a couple of people I know who work with audio books and a couple who record lectures.

All three who found the modification useful suggested a longer maximum for "minimum distance". Both audio book people suggested 15 - 30 minutes which they thought was a good length for a manageable section to upload to a web site. Those two are mainly concerned with getting a broadly similar length for each segment, while of course not wanting to split in the middle of a word or sentence if possible.

The person recording lectures who liked the modification said he sometimes ended up with too short a section at the end as the label placement worked out. He would much rather see this mod. in Sound Finder so he can just export worthwhile audio as far as possible.

The person who didn't find the mod useful said that a lot of labels close together was an indication to him that an area might need cutting out.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual
Gale Andrews
Quality Assurance
 
Posts: 26089
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Minimum length mod for Silence Marker and Sound Finder

Permanent link to this post Posted by steve » Tue Jun 08, 2010 5:20 pm

I think that the case for counting forward is much stronger in the case of SoundFinder.
Has anyone got an opinion on that?

The terminology would probably be a bit different - perhaps "Minimum label length"?
There could be a "Help" note that the final section of audio may be less than the target length.

@Daga - I believe you indicated some interest in modifying the SoundFinder effect. Are you still interested in giving it a go?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45650
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Minimum length mod for Silence Marker and Sound Finder

Permanent link to this post Posted by steve » Tue Jun 08, 2010 5:29 pm

Re. splitting Audio books:
What would be most useful if there is no pause anywhere near the minimum target length?
Perhaps a special label put in at the target length regardless of the absence of a gap: "NO GAP"

(muses to self...) How would that work?
If the the label length is greater than 2x the "minimum" length "NO GAP" labels are inserted with the spit in the middle?
That would alert the user that they need to manually adjust that split point.
If label length is greater than 3x the minimum length, then three "NO GAP" labels, with the two splits evenly spaced?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45650
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Previous

Return to Nyquist



Who is online

Users browsing this forum: No registered users and 1 guest