问题
I'm doing an app where I want to detect sound frequency. How to detect frequency for particular sound like dog sound? Does anybody have tutorial or some sample codes?
回答1:
Detecting a single frequency, or even computing a single FFT, is not a reliable method for differentiating a dog bark from other common sounds of around the same volume.
What might work is sound fingerprint analysis using MFCC's, followed by statistical pattern matching against a large enough "dog" sound database. Some pointers to the type of signal processing required might be answered here: Music Recognition and Signal Processing
This is non-trivial stuff more suited for multiple college textbook chapters than any short tutorial.
回答2:
To detect the frequency, you can use a pitch detection algorithm like FFT.
Learn more here: http://en.wikipedia.org/wiki/Pitch_detection_algorithm
You can look at this project for working source code for iOS that uses FFT algorithm to detect frequencies: https://github.com/hollance/SimonSings
来源:https://stackoverflow.com/questions/13950358/how-to-detect-sound-frequency-for-particular-sound-in-iphone