I am trying my hands at Audio Processing in python with this Beat Detection algorithm. I have implemented the first (non-optimized version) from the aforementioned article.
A good bet would be to try portaudio (pyaudio) to get the data live, then you should be able to see if it matches.
Here's a nice example using fft from the mic with pyaudio:
http://www.swharden.com/blog/2010-03-05-realtime-fft-graph-of-audio-wav-file-or-microphone-input-with-python-scipy-and-wckgraph/