Batch Editor for Silence Labels

Effects, Recipes, Interfacing with other software, etc.
Forum rules
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
Locked
audiobookfan
Posts: 7
Joined: Tue Jan 03, 2012 7:19 pm
Operating System: Please select

Batch Editor for Silence Labels

Post by audiobookfan » Tue Jan 03, 2012 7:34 pm

I have hundreds of old Books-on-Tape and have been transferring them from cassette to mp3. Of course, I end up with very unwieldy hour-long recordings with no tracks. Using the “Regular Interval Labels” utility set to 60 seconds with a subsequent use of the “Export Multiple” routine would be ideal; however since the intervals often land right in the middle of a spoken word, an annoying and sometimes unintelligible skip occurs.

A utility that would allow for the editing of silence points would be great. If the “Minimum Duration of Silence” option on the “Silence Finder” utility is set sufficiently low to locate the space between the spoken words (say 0.1 seconds), the utility would return a huge number of silence points. However, if there was a way to then remove all the silence points EXCEPT those that are nearest to the original interval desired (say 60 seconds) the large number of silence points would be reduced to a manageable number and the problem of the annoying skipping would be solved. The intervals between the silence points would not be exactly 60 seconds, but the recording would still end up with about one label per every minute and would be located sufficiently close to 60 seconds as to not really matter. I prefer 60 second intervals, but the batch editor could give the user a choice of interval length in seconds like that seen on the "Regular Interval Labels" utility.

Batch utilities like this are so convenient and useful because the time required to go back and find the silence points by hand would be significant. Audacity is the near-perfect program and I love using it. But an addition like this would make it perfect for audiobook lovers like me.

Anyone out there think this could be written?

kozikowski
Forum Staff
Posts: 68902
Joined: Thu Aug 02, 2007 5:57 pm
Operating System: macOS 10.13 High Sierra

Re: Batch Editor for Silence Labels

Post by kozikowski » Tue Jan 03, 2012 9:48 pm

Batch utilities like this are so convenient and useful
It would, yes. which is why this is a very common request. Anybody who's sat through digitizing their entire collection of LP albums has said the same thing. "Why can't I get it to recognize the spaces between songs?"

You unconsciously do pattern and content recognition when you do it manually, and that's rough to do in software.

For example, you may hear the area between words as "silent" when in fact it's no such thing, and there are times when your vocal projection seems to be silent, and that's not actually true, either. Software only works on strict data and pops or clicks in the grooves or hiss in the tapes throw it off.

Turns out you have to "hit it" exactly right between silent sense adjustments and peak sensing and then the tool works perfectly for one record or tape.

There are two tools, Analyze > Silence Finder and Sound Finder that you can try. These are two pre-baked tools that might do what you want, but only if you set them right.

Koz

Edgar
Forum Crew
Posts: 2042
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: Batch Editor for Silence Labels

Post by Edgar » Tue Jan 03, 2012 11:11 pm

I have done something similar in C++ but there is no way the Audacity Developers will add this feature in the foreseeable future.

My process was to start at "zero" time (in samples), set a label as "1" (based on converting an "placeholder" integer--initialized to 1--to a string); jump forward a set ("skip time" -- in OP's case slightly less than 60 seconds) number of samples, start looking for a sequence of consecutive sample which match my idea of "silence" (I would have a settable variable for this "noise floor") and is long enough to trigger my definition of "pause time after punctuation". When such a "pause" is found (after testing to make sure I am not too close to the end), I add one to "placeholder", place a label about half way through the "pause" and jump forward "skip time" (always watching for the end of the samples). Repeat until end of samples.

I bet Steve could do this in Nyquist!
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

audiobookfan
Posts: 7
Joined: Tue Jan 03, 2012 7:19 pm
Operating System: Please select

Combining “Silence Finder” and “Regular Interval Labels"

Post by audiobookfan » Wed Jan 04, 2012 6:52 pm

I posted earlier on a batch editor for the silence points generated by the “Silence Finder” utility and the feedback indicates that this may not be something that will be undertaken. Thanks for the responses because they were helpful.

This issue I am dealing with really is most pronounced in editing audiobooks rather than music. In music, each song has its determined ending point which is the logical placement for a track. However on audiobooks it would be very helpful to place the tracks at even intervals of say 60 or 120 seconds, especially when using an iPod or mp3 player.

How about something along this line: Add the ability to place the regular interval labels at the nearest silent point. The parameters for the regular intervals could be selected in the same way as they are now.

The silent point could be selected in the same way as they are on the “Silence Finder” utility. Using this, the label could be placed not at the exact spot (say 60.0 seconds), but be placed either before or after the desired interval (say 59.2 or 60.9 seconds). The label would still be sufficiently close to the desired 60 seconds, but not placed in the middle of a spoken word, causing the unintelligible skip.

What are the forum members’ thoughts on this?

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Combining “Silence Finder” and “Regular Interval Labels"

Post by steve » Wed Jan 04, 2012 7:51 pm

You may be interested in having a look at this discussion (I've just quoted you)
http://forum.audacityteam.org/viewtopic ... 39&t=62867
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

audiobookfan
Posts: 7
Joined: Tue Jan 03, 2012 7:19 pm
Operating System: Please select

Re: Combining “Silence Finder” and “Regular Interval Labels"

Post by audiobookfan » Wed Jan 04, 2012 9:20 pm

Hi Steve,

I read the thread and what you said at the very end regarding the "Minimum duration of sound" is exactly what I was looking for. I like to set the regular interval duration to 60 seconds because then every track number will correspond to the minute of the entire recording. So when I look at the iPod and I am on track 47, I know that I am listening to the 47th minute of what would have been side A of the cassette tape.

With your "Minimum duration of sound" utility, the length could be set to 60 seconds and the label would be set at the next silent point after 60 seconds. The placement would be at say 60.51 seconds, but would still be sufficently close to 60 seconds to fulfill the desired regular interval requirement AND (most importantly) it would not split a spoken work in two causing an unintelligible skip.

An addition of this utility would be a substantially powerful tool and would be very helpful for those of us who have hours and hours of coverted audiobooks.

Thanks for your response and quoting my interests in the other post.

audiobookfan
Posts: 7
Joined: Tue Jan 03, 2012 7:19 pm
Operating System: Please select

Re: Combining “Silence Finder” and “Regular Interval Labels"

Post by audiobookfan » Fri Jan 06, 2012 2:42 pm

Hi Steve,

I've been thinking about this issue about the "minimum time between silence points" you brought up. What language is the silence finder utility programmed in? Would an addition of the minimum interval be difficult to do? Time consuming? Would the original developer be OK with this change? I really don't know much about programming or these languages so I am about as much a rookie as one might find on this forum board.

What a huge improvement it would be, though, to be able to have regular interval lables placed at the nearest silence instead of bisecting the spoken word.

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Combining “Silence Finder” and “Regular Interval Labels"

Post by steve » Fri Jan 06, 2012 4:25 pm

audiobookfan wrote:What language is the silence finder utility programmed in?
Nyquist (http://audacityteam.org/help/nyquist)
audiobookfan wrote:Would an addition of the minimum interval be difficult to do? Time consuming? Would the original developer be OK with this change?
It would not be particularly difficult to modify "Sound Finder" to add a "Minimum duration of sound" control. I would like to add this functionality to the version being discussed here: http://forum.audacityteam.org/viewtopic ... 39&t=62867 but I'm still unsure how to implement the other requested feature of "Ignore sounds shorter than [seconds]". The version that I am currently working on is completely restructured so that sound and silence detection are separated out from the functions that determine which sounds get marked and which ones don't. This makes it a lot easier to modify the selection algorithms.

In terms of the code, "Sound Finder" is a lot closer to the functionality that you are asking for than “Regular Interval Labels".

I find that the most time consuming part of writing plug-ins are writing the help screens (when applicable) and reaching general agreement about what features should be implemented, the wording in the GUI and other such details (the "committee" stage).

Both "Sound Finder" and “Regular Interval Labels" are licensed as open source (GPL v2) so within the terms of the license it is perfectly acceptable to modify the code.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Combining “Silence Finder” and “Regular Interval Labels"

Post by steve » Fri Jan 06, 2012 4:26 pm

It may be better to continue this conversation over in this thread: http://forum.audacityteam.org/viewtopic ... 39&t=62867
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

steve
Site Admin
Posts: 80679
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Combining “Silence Finder” and “Regular Interval Labels"

Post by steve » Sun Feb 05, 2012 1:20 pm

Related topics merged and locked.

These feature requests are now being dealt with in this Nyquist board topic: http://forum.audacityteam.org/viewtopic ... 39&t=62867
This topic temporarily retained for reference.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked