Open cofiem opened 3 years ago
The key outcome from this would be that Audacity could be used as a visual editor for audio labels, which might make it easier for people to view output results and create the input expected results.
Beautiful. I have currently implemented reading from AviaNZ labels files and recursive imports for egret labels.
Raven was next on my list; Audacity was planned too.
I did not consider writing results to AUP files though.
Something I'll have to document later is that some of the output formats won't output all possible information. The CSV output is a good example (only outputs summary stats). But that also means a new outputter is not required to output everything either (maybe only outputting results).
Also, something to consider: each result is uniquely identifiable by a tuple of (suite, tool, type). You can see that in the CSV formatter where we flatten the results into one enumerable:
From that, there are some open questions:
selLow
and selHigh
attributes?If egret can also read the tag and labels from an Audacity project file, then the labels could be created in Audacity and used as input for analysis tools. An Audacity project file could be specified in the expect - where it has label and bounds in the configuration, that could instead be something like audacity_project_file and a path to the file.
Okay, follow the importer model here. Look at the AviaNZ importer and the EgretImporter. Both are still incomplete, but an audacity importer was definitely planned.
I'm very happy for you to have a go.
I would suggest a three phase approach:
I think with this approach, easily reading and writing data will make everything easier. Reading as expectations is the least novel idea and should fit well in with other importers - I made egret to import things - so any impedence between the audacity format and the egret structures can be worked out (e.g. how does sel[Low|High] effect the import?).
With those two in place it should be much simpler to do the writer (and a complete story, read, test, write).
A couple of notes:
In the project
XML element, the attributes sel0
and sel1
are the current time range selection.
And selLow
and selHigh
are the frequency bounds of the current selection.
In the label
XML element, the attributes selLow
and selHigh
are the frequency range of the label.
All sel*
attributes are in Hz.
Also note that Audacity seems to fail to load .aup
files saved with UTF8 BOM
. Make sure the .aup
files do not have the Byte Order Mark.
This project is quite interesting!
I've been working with audio files and Audacity, as well as some custom audio analysis.
I thought it would be useful to be able to read and write Audacity project
.aup
files. Only the Label Tracks and project Metadata tags. Note that labels are limited to 260 characters.Goal
The key outcome from this would be that Audacity could be used as a visual editor for audio labels, which might make it easier for people to view output results and create the input expected results.
Details
My idea is that
egret
could write Audacity project files with metadata tags and label tracks, using thename
attribute for the suite and tool information, and thetitle
attribute for individual result information. Possibly separated by semicolons. These Audacity project files would contain only the label tracks. Then the project and any audio file(s) could be opened in Audacity, and it would be possible to look at the audio with the labels in Audacity.If
egret
can also read the tag and labels from an Audacity project file, then the labels could be created in Audacity and used as input for analysis tools. An Audacity project file could be specified in theexpect
- where it haslabel
andbounds
in the configuration, that could instead be something likeaudacity_project_file
and a path to the file.There are all sorts of way this could be extended, but I think a good starting point is writing results from
egret
as Audacity project files with labeltracks and labels, and reading an Audacity file and using all labels from all labeltracks as the input to the expected results configuration. There could also be customtags
when writing the file to record the overall information from anegret
run.This is how the label tracks look with a stereo audio track (from here):
The
.aup
file is XML. Here is a sample file, this file could be both input as the expected results, and output, as the results from an analysis run byegret
:Here's what this project file looks like in Audacity:
Next Steps
What do you think?
If you're keen, I'm willing to have a go at implementing this.