简体   繁体   中英

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM