mardi 30 décembre 2014

Python PyAudio + mic input - specific frequency filter?

I'm currently working on a radio astronomy project where I need to monitor the amplitude of an audio signal over time.


I've used the simplified Python code suggested by user1405612 here Detect tap with pyaudio from live mic which takes the mic input and works out the RMS amplitude and I've added a part to simply log the value to a CSV file. This is working very well, and thanks must got ouser1405612 for it!


However is there a way I can implement a simple frequency filter to this code. For example I am interested in the RMS amplitude of frequency 19.580khz (in reality I would want to look at the range of say 19.4hkz to 19.6hkz)?


Is there a way to do this with PyAudio using the code in the link above by looking at the raw stream data for example, or any other way? I don't want anything complex like graphs, spectrum analysis etc, just a simple frequency filter. Unfortunately a band pass filter before the mic input is not possible, so it needs to be done on the computer.


Thanks in advance!


Aucun commentaire:

Enregistrer un commentaire