Adding Bookmarks Externally

This section is now closed.
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.
Locked
tonyEastwood
Posts: 3
Joined: Mon Oct 06, 2008 12:22 pm
Operating System: Please select

Adding Bookmarks Externally

Post by tonyEastwood » Mon Oct 06, 2008 12:44 pm

Dear sirs

I wonder if you could help me.

I have some experience of using Audacity in editing speech files. It is very good. Currently I have edited about 30 hours of final sound in very great detail (its taken me over 300 hours to this!) This is an entirely voluntary, not for profit , activity. (If you are interested I can send the link to where you download our stuff - its all public domain when its finished - but it is all in Welsh!)

To save time I now have a java program that processes wav files. It understands a particular problem that takes a long time in Audacity to do. (Which is how to remove a certain type of click – but only from the gaps between spoken text - and leave the spoken text totally unaffected - I have not yet found any tool in Audacity that can do this for me).

One of the outputs from my java is a file (could be xml) telling what alterations the process made - I can get it to tell me the samples numbers its changed and also their offsets in terms of elapsed time or sample count.

I'd like to import this log into the Audacity files so that the next time I re-open Audacity I have a series of 'book marks' showing me the areas I have changed.

To do this I could reverse enginneer the file format to do this - I have not looked yet. But if there is a published spec that will be very helpful - so far I haven't found on your site where I can access the code (or maybe the library used to serialise to and from the file system?).

In 'ordinary life' I'm CTO of a java xml and database company so don't worry if your description is very (very) technical - reading/writing binary files is something I've been doing for the last 25 years

many thanks

Tony Eastwood

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

Re: Adding Bookmarks Externally

Post by steve » Mon Oct 06, 2008 2:13 pm

tonyEastwood wrote:I now have a java program that processes wav files. It understands a particular problem that takes a long time in Audacity to do. (Which is how to remove a certain type of click – but only from the gaps between spoken text - and leave the spoken text totally unaffected
That sounds great - what's the program? does it cost money?
tonyEastwood wrote:I'd like to import this log into the Audacity files so that the next time I re-open Audacity I have a series of 'book marks' showing me the areas I have changed.
I think the using "Labels" may do the trick.

Probably best to stick with Audacity 1.3.x as this will be the basis of the next stable version (1.4.x).

The label format is very simple and can be imported and exported from Audacity 1.3.x
It is just a text file with start times, end times, and the label name.

Here is a simple example - if you copy this into a plain text file and save with a .txt extension, you can import it into Audacity 1.3.x (from the file menu) and see how it works. Here we have 3 labels -

Code: Select all

0.000000	2.000000	0Label
10.000000	15.000000	1Label
20.000000	22.000000	2Label
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

tonyEastwood
Posts: 3
Joined: Mon Oct 06, 2008 12:22 pm
Operating System: Please select

Re: Adding Bookmarks Externally

Post by tonyEastwood » Tue Oct 07, 2008 7:57 am

Steve

Thank you for the very helpful reply - I had been using an old version of audacity (1.2.6) and that hadn't got import labels, only export. I am sure that 'import labels' will do the trick.

When I have it working correctly I would pleased to send you my Java code. I'd expect/hope to get good results this week. But don't expect anything great -- I have no experience of digital signal processing. The whole thing just simply works on amplitude/average amplitudes in a very crude way - I'm haven't even needed to do FFT yet, the results have been good enougth without . (But if I took this code to work my colleagues would all laugh at it!)

So basically all it does is divide the wave file into regions which are contiguous phrases of speech (or just before or after such regions) and regions which should be the gaps between spoken phrases. Then in the 'gaps between spoken phrases' I can simply zap out spikes. Its a very simple hueristic. (at least I hope continues to be very simple, hueristic algorithms soon grow into ornate and baroque monstrosities!).

Getting labels visible in Audacity is an essential feature of the correct development of the hueristic. My experience of hueristics so far is that its far too easy to complicate an algorithm simply because you didn't correctly interpret what it was doing in the first place!

My algorithm is parameter driven (reads a simple properties file) - so it should be useful for other people recording high quality speech. We use a very good mike in quasi-studio conditions - so every recording comes gets to me with the same uniform sound pressure levels. But by altering properties in the properties file you can adjust the algorithm to cope with different levels.

Is there anything within Audacity itself that would do anything similar? -e.g. find low energy regions of a wav and then apply some effect to mutliple makred regions?. I have experimeted a fair bit with most of the tools but so far have not found anything that does exactly what I'd want - either in terms of finding low energy regions or of removing clicks (via delete). It speech, of course, so I don't have to preserve rhythym to same extent that one would have to do when editing music - I can simply cut out 1/50ths second (and more!) and its essentially undetectable.

thanks again

Tony

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

Re: Adding Bookmarks Externally

Post by steve » Tue Oct 07, 2008 8:20 am

This sounds like a very interesting project.
tonyEastwood wrote:I had been using an old version of audacity (1.2.6) and that hadn't got import labels, only export.
You have posted in a 1.3.x section of the forum (see "Forum Index ‹ Audacity Unstable (1.3.x) ‹ Windows" at top of the page).
Audacity 1.3.5 has both Export and Import labels.
Also, the labels in Audacity 1.3.x are different from 1.2.x - in 1.2.x, labels are just single points, whereas in 1.3.x they are regions and have a start point and an end point. I think that 1.3.x labels will be far more useful for you.

If I understand correctly, you are wanting to detect regions that have relatively low levels recorded on them?
I think that you may be able to do this in Audacity using "Silence Finder" in the "Analyse" menu in Audacity 1.3.5.

Another advanced feature of Audacity is that it has built into it a programming language called "Nyquist".
Nyquist programming language is based on XLisp (a derivative of LISP) and is designed for sound synthesis and manipulation.
Audacity does not have a full implementation of Nyquist, it lacks many of the additional libraries that are included in the full version, but it has enough to make it very useful and flexible.

There is a section in the Audacity wiki about Nyquist (see link at top of the page). I've been playing with Nyquist for a couple of months now, and have made a few plug-ins for Audacity. I'm by no means an expert, but I may be able to help you get started with it if you are interested.

BTW, the silence finder in Audacity is itself a Nyquist plug-in.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

tonyEastwood
Posts: 3
Joined: Mon Oct 06, 2008 12:22 pm
Operating System: Please select

Re: Adding Bookmarks Externally

Post by tonyEastwood » Mon Oct 13, 2008 12:48 pm

I have got a very good working version now. I intend creating a open source project for it on source forge. I scanned the source forge site and couldn't find anything at all similar.
I'll re-post here when I have refactored the code and checked it in so that its its nicely readable for anyone else who would like to use it or contribute.

Currently I have one minor audacity-related issue. I create label files to show all the changes I've made. When first import lables they exactly match the wave file as you would expect. But if I delete anything in the wav file (e.g. if I spot a click that was 'too big' for my algorithm to handle and simply delete it by hand in Audacity ) then Audacity loses the synchronization of all the lables to the right of my edit (i.we. later in the sound).

Is it possible to set that the labels are to remain 'synchronized' after deletes - and I guess other operations?'

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

Re: Adding Bookmarks Externally

Post by steve » Mon Oct 13, 2008 5:24 pm

tonyEastwood wrote:urrently I have one minor audacity-related issue. I create label files to show all the changes I've made. When first import lables they exactly match the wave file as you would expect. But if I delete anything in the wav file (e.g. if I spot a click that was 'too big' for my algorithm to handle and simply delete it by hand in Audacity ) then Audacity loses the synchronization of all the lables to the right of my edit (i.we. later in the sound).

Is it possible to set that the labels are to remain 'synchronized' after deletes - and I guess other operations?'
At the moment - no. The label track is not "attached" to the audio tracks in that way.
I did read something about that - I think it may be planned for Audacity 1.5 beta (that will be the new beta version after Audacity 1.4.0 stable is released).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked