0

I was wondering, what is the best way to have a python program listen to a stream of audio and wait for a certain frequency, for example, 60 Hz, and then record that stream?

[EDIT] I'm referring to basically just having the program listen for a certain frequency that when it hears it, it does something.

  • 2
    Pass the stream through a sliding window and FFT it? And window should be sufficiently wide for FFT to have bands as narrow as you need to isolate that frequency. – bipll May 11 '17 at 22:11
  • Then (just to expand bipll's comment) check continually for when the magnitude of that bin passes some set threshold, and start recording when it does. – Linuxios May 13 '17 at 02:48

0 Answers0