Detect frequency of audio input - Java? <p>I've been researching this off-and-on for a few months. </p> <p>I'm looking for a <em>library</em> or <em>working example code</em> to detect the <strong>frequency in sound card audio input</strong>, or detect presence of a given set of frequencies. I'm leaning towards Java, but the real requirement is that it <em>should be something higher-level/simpler than C</em>, and <strong>preferably cross-platform</strong>. Linux will be the target platform but I want to leave options open for Mac or possibly even Windows. Python would be acceptable too, and if anyone knows of a language that would make this easier/has better pre-written libraries, I'd be willing to consider it.</p> <p>Essentially I have a <strong>defined set of frequency pairs</strong> that will appear in the soundcard audio input and I need to be able to detect this pair and then... do something, such as for example record the following audio up to a maximum duration, and then perform some action. <em>A potential run could feature say 5-10 pairs, defined at runtime, can't be compiled in</em>: something like frequency 1 for ~ 1 second, a maximum delay of ~1 second, frequency 2 for ~1 second.</p> <p>I found suggestions of either doing an FFT or Goertzel algorithm, but was unable to find any more than the simplest example code that seemed to give no useful results. I also found some limitations with Java audio and not being able to sample at a high enough rate to get the resolution I need.</p> <p>Any suggestions for libraries to use or maybe working code? I'll admit that I'm not the most mathematically inclined, so I've been lost in some of the more technical descriptions of how the algorithms actually work.</p>