开发者

How can i detect sound frequency on Java

I need to read the audio streaming and determine 开发者_开发问答generated ultrasounds How can I find a certain sequence of sounds from streaming audio?

At first I thought in the direction of DTMF, but then rejected it because it is the human ear hears.

If you have any other ideas, I'll be happy to hear them.


The straightforward way would be using a Fourier transform that turns periodic signals into a nice frequency chart. Chop your incoming signal into short portions, apply FFT and see if you have high enough levels at the right part of the spectrum. This will of course work only for signals that are long enough.

But detecting ultrasound with stock PC audio input may be tricky; it's standard to discretize the incoming sound ad 44100 Hz, so you'll only have very distorted signs of near ultrasound. Newer cards are capable of higher discretization frequencies, like 192 kHz.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜