iPhone: CPU power to do DSP/Fourier transform/frequency domain?

泄露秘密 提交于 2019-12-22 04:25:18

问题


I want to analyze MIC audio on an ongoing basis (not just a snipper or prerecorded sample), and display frequency graph and filter out certain aspects of the audio. Is the iPhone powerful enough for that? I suspect the answer is a yes, given the Google and iPhone voice recognition, Shazaam and other music recognition apps, and guitar tuner apps out there. However, I don't know what limitations I'll have to deal with.

Anyone play around with this area?


回答1:


Apple's sample code aurioTouch has a FFT implementation.




回答2:


The apps that I've seen do some sort of music/voice recognition need an internet connection, so it's highly likely that these just so some sort of feature calculation on the audio and send these features via http to do the recognition on the server.

In any case, frequency graphs and filtering have been done before on lesser CPUs a dozen years ago. The iPhone should be no problem.




回答3:


"Fast enough" may be a function of your (or your customer's) expectations on how much frequency resolution you are looking for and your base sample rate.

An N-point FFT is on the order of N*log2(N) computations, so if you don't have enough MIPS, reducing N is a potential area of concession for you.

In many applications, sample rate is a non-negotiable, but if it was, this would be another possibility.




回答4:


I made an app that calculates the FFT live

http://www.itunes.com/apps/oscope

You can find my code for the FFT on GitHub (although it's a little rough)

http://github.com/alexbw/iPhoneFFT

Apple's new iPhone OS 4.0 SDK allows for built-in computation of the FFT with the "Accelerate" library, so I'd definitely start working with the new OS if it's a central part of your app's functionality.




回答5:


You cant just port FFT code written in C into your app...there is the thumb compiler option that complicates floating point arithmetic. You need to put it in arm mode



来源:https://stackoverflow.com/questions/1425504/iphone-cpu-power-to-do-dsp-fourier-transform-frequency-domain

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!