Coder & Designer wanted for LV audio analysis program

Non-reading activities need your help too!
Locked
Cori
Posts: 12124
Joined: November 22nd, 2005, 10:22 am
Location: Britain
Contact:

Post by Cori »

Summary: an online tool (possibly offline too!) which takes an MP3 file and produces a readout as to how it matches up to the LibriVox technical requirements, also giving volume and file-naming guidance.

History: I was PMing with someone about something else entirely, when I suddenly thought (and typed) "wouldn't it be neat if I could just get a listing of file features, with problems flagged." I don't think everyone would need to use it all the time, it doesn't need to be tied into the uploader or anything, but I know I often wonder how my Db/volume looks, and peek into the validator to compare ... and I think it might be quite helpful for newcomers to have a very userfriendly-but-automated way to check themselves, if they're a bit self-conscious about launching into a sample. It'd be neat if people could check their own sound levels after changing mics or computers and so on, even if they've never been very clued up about what a "loud" soundwave should look like (and without being clippingly loud, either.) Of course people will still be encouraged to ask for help whenever they need it! This is an extra to the current processes. I floated this idea by a few other folks, none of whom told me I'm insane, and some of whom have made helpful amendments, incorporated below, so I'm putting this out to tender.

Spec: LibriVox recorders will upload an MP3 in a similar way to how we use the Uploader at the moment. Once the file is uploaded, a summary page will appear, which shows relevant tech. stats.
* bit rate
* sample rate
* a rough filename check (which would simply check for capital letters, spaces and evil characters)
* Db average
* visual readout on the whole file (or mebbe just the first X mins) - a graphic of the soundwaves - with some kind of two-word interpretation as to whether this is likely to be too quiet or loud or within listener-tolerance levels (aka. Good!)

The files are only stored temporarily, and can be deleted as soon as the summary is produced, or as convenient.


Design thoughts: needs to be completely different to the uploader. Because the feedback text is 'canned', it can also be translated into any language people are willing to port to. The design needs to accomodate this, and also have a language-switcher. A "friendly feel" is really important, along with a LOT of tool-tips & links to help features. Some sort of "dashboard / control panel" look would be cool (little analog dials! Brass gauges! Steampunk me, baby!)

Here's how it shouldn't look ... but I wanted to do SOMETHING to get across the ideas, esp. the visual chart at the bottom.

Image

And here's a too quiet one. Yes, I know it's seriously un-colour-blind people friendly, but it's a proof of concept.

Image

Discussion welcomed ... other features welcomed ... people who can actually make this happen especially welcome! Initially, we may have to work out some kind of sandbox somewhere off LibriVox, but hopefully once it works and is roadtested, it'd be integrated somewhere here. "Preview / Test your file".
There's honestly no such thing as a stupid question -- but I'm afraid I can't rule out giving a stupid answer : : To Posterity and Beyond!
earthcalling
Posts: 6604
Joined: April 8th, 2006, 2:26 pm
Location: London, England

Post by earthcalling »

Looks like a fine idea to me, Cori.

Could it also check for stereo files? (Are we consistent about whether stereo is OK?)

David
Hokuspokus
Posts: 8065
Joined: October 24th, 2007, 12:17 pm
Location: Germany
Contact:

Post by Hokuspokus »

Great idea! Would be very useful to have such a tool.
Unfortunately a can't offer any help. Technically blond. :(

To me, the look you created is good.
I don't think that different languages are necessary. People here now enough English to understand.
(But, one day Librivox will have a level of internationality for readers who know no English at all. Would be a good preparation.)
icyjumbo

Post by icyjumbo »

I'd like to be involved with this.

I don't know how to do it at all, but I'm sure I could find out, and I'm sure I could produce something that meets the requirement. I'm also sure that there are others who would do it quicker and/or sooner than I, if they were free. But I'd certainly appreciate the learning opportunity.

What d'you say? Who should I liaise with?
Cori
Posts: 12124
Joined: November 22nd, 2005, 10:22 am
Location: Britain
Contact:

Post by Cori »

Mmm, yes, David, I think it'd be good to point out that stereo files aren't recommended, though as far as I know, LV isn't militant about mono-only.

Hope to get you as a tester, mebbe, Hokuspokus, a bit further down the line!

Chris, well ... it's me at the moment! I've had no backchannel about this at all. I know it's possible because our validator curently does some of these tests (bit rate, sample rate) ... but as to how it works, I've no idea. As for quicker and faster -- it's taken me more than two years to think of this, so that's your deadline for completion, too. :lol: I'd appreciate any help! And if we end up getting two tools developed, then that's fine too -- they might suit different platforms, or be blendable in some way.
There's honestly no such thing as a stupid question -- but I'm afraid I can't rule out giving a stupid answer : : To Posterity and Beyond!
icyjumbo

Post by icyjumbo »

OK, Cori, I'll start poking around and see what software libraries I can find.

You mentioned that the validator does some checking. Is the source code for the validator available for me to look at?
kayray
Posts: 11828
Joined: September 26th, 2005, 9:10 am
Location: Union City, California
Contact:

Post by kayray »

mono vs. stereo -- we recommend mono because it takes up less room on the reader's hard drive while it's uncompressed. Once it's converted to mp3, it's all the same to us. I wouldn't bother making a mono vs. stereo checker.

Looks very nifty!
Kara
http://kayray.org/
--------
"Mary wished to say something very sensible into her Zoom H2 Handy Recorder, but knew not how." -- Jane Austen (& Kara)
Great Plains
Posts: 870
Joined: September 23rd, 2007, 11:02 am
Location: Manchester, NH, America
Contact:

Post by Great Plains »

icyjumbo wrote:OK, Cori, I'll start poking around and see what software libraries I can find.

You mentioned that the validator does some checking. Is the source code for the validator available for me to look at?
I don't know of any libraries to read raw Mp3 data available for PHP. (I assume the LV website uses PHP.) But the MP3 file format is a fairly simple one to read. The bit rate, frequency, and mode (i.e. stereo vs mono) are all encoded in 4-byte headers in each of the frames in the stream. The biggest problem, of course, will be checking to make sure the file is constant bit rate as opposed to variable bit rate (I assume CBR is preferred at LV rather than VBR).

Determining the loudness of the file and outputting a graphical representation of the waveform would be more difficult. But certainly it can be done. "Replay Gain" is a popular feature on modern media players and codecs.
Daniel, the Cylon
([url=http://librivox.org/newcatalog/people_public.php?peopleid=2136]LV Profile[/url])
icyjumbo

Post by icyjumbo »

Like you, Daniel, I assumed that I should be looking for PHP libraries, and indeed I did find a couple of sites that had PHP code that would give me the metadata from MP3 files (and other audio files, in one case). It does look reasonably easy to read the MP3 block headers too, from the info that I found about the format. I was waiting until I knew what the current software setup was so that I could choose something that would interface comfortably with it. I'm keeping links to these pages on del.icio.us at http://del.icio.us/icyjumbo/mp3 and http://del.icio.us/icyjumbo/id3. Please feel free to send me any other links you think I might find useful, using del.icio.us's for:icyjumbo tag.
Hokuspokus
Posts: 8065
Joined: October 24th, 2007, 12:17 pm
Location: Germany
Contact:

Post by Hokuspokus »

Cori wrote: Hope to get you as a tester, mebbe, Hokuspokus, a bit further down the line!
Would love to test.
Hope there is no danger in it. Have to think of that poor Timmy, from The Dinos. :wink:
tis
Posts: 1277
Joined: September 26th, 2005, 3:53 pm
Location: Sydney, Australia
Contact:

Post by tis »

A bit of technical stuff... the validator is (mostly) written in ruby, and it uses the mp3info library for some analysis.

We also use the command line utilities id3v2 (to read and modify the metadata), and mp3gain (to fix the volumes). These are both accessed from ruby via IO.popen.

I'm happy to share (at least portions of) the code with anyone who would like to help out; I would happily release the whole thing to the public but I haven't done a security audit on it yet, so I'd rather keep any holes obscured!

That all said, while interfacing with what we have sounds a good plan, there are always ways to glue odd pieces together :). So go with what you're comfortable with. PHP would certainly be a good choice - the catalog system is PHP, and it represents the future for the LibriVox backend. I'd treat the validator as legacy code!
[img]http://goringe.net/images/chris.png[/img]
branko
Posts: 31
Joined: August 14th, 2007, 9:25 am

Post by branko »

There's a real-time sound tool kit called Snack. It supports multiple file formats, among them MP3, it does on the fly visualisation, it knows about "high level sound objects"--don't know what those are, but they sure sound good--and too many other things to mention.

The only problem I can see is that the toolkit doesn't seem to have been updated in four years.
Cyclometh
Posts: 43
Joined: July 21st, 2008, 7:29 pm
Location: Olympia, WA

Post by Cyclometh »

I know the LV website is PHP-based. Do you have access to the .NET Framework there? Can you run ASPX pages?

I'm good at .NET but have little experience with PHP.
icyjumbo

Post by icyjumbo »

Chris, can you give us some idea of the runtime environment of LibriVox. I guess that both librivox.org and upload.librivox.org run linux, but what sort of libraries and facilities are available. How about image magick? Java? Can we execute command-line programs from the server? I'm not very experienced in coding for the web environment, which means I don't know what questions are obviously stupid, and which are reasonable.

Thanks for any info.
FNH
Posts: 391
Joined: July 1st, 2007, 9:58 am
Location: Northampton - UK

Post by FNH »

I've written a Windows ( therefore not web ) program to do the basic checks. You can download if using the below link.

http://cid-4425409b25896345.skydrive.live.com/self.aspx/Software/MP3Checker.zip

To use the program, just get it running and then drag and drop an mp3 onto the window and it'll show you the stats and highlight any potential problems in yellow.

Technical stuff. This uses the DotNetFramework, so it'll only work on Windows, it MAY work on other operating systems if they have the framework installed.

Installing : The link above is to a zip file, you'll have to download it, unzip it. It contains three files. Double click on the "MP3Checker.exe" to start it running.

If you have suggestions or problems PM me here and I'll see if there is anything I can do.

.
http://CthulhuPodcast.co.uk
http://WriteTheFirstDraft.blogspot.com
Locked