Audacity Programming Newbie -- General Question

This semester I have a project that involves sound pattern matching, and I’m looking for some general advice on starting. I’ve already downloaded and compiled the latest Audacity, and played around with it a bit, and now I’m ready to write the skeleton program. So here’s the overall concept:

I want to write a program that basically starts up, records 5 seconds of audio, passes that recording to a pattern-matching function (which will be blank for now), and either repeats the process if there’s no match, or reports the details of the match if one is found. Fairly straightforward I think, minus the pattern-matching function… but I’ll cross that bridge later.

I want to use Audacity as a base for this because I think the plugins and effects (like Notch Filters and such) will help later on in removing noise and matching sound patterns.

Can you guys point me in the right direction for writing this basic skeleton program? Does anyone have sample code that just records audio for a few seconds and saves it to a file? I just need something to help me get started.

Thanks so much! :smiley:

~Michael

You may find that SOX is better suited for this as Audacity is almost entirely GUI based.