我有多少的FFT每秒可以做我的智能手机? (用于执行语音识别) [英] How many FFTs per second can I do on my smartphone? (for performing voice recognition)

查看:281
本文介绍了我有多少的FFT每秒可以做我的智能手机? (用于执行语音识别)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我探索语音识别和DSP,所以我想实现我的智能手机一个简单的声音频率分析仪(我同时拥有一部iPhone和三星Nexus S运行Android)。我曾在Matlab previously完成基本的DSP。

I'm exploring voice recognition and DSP, and so I would like to implement a simple sound frequency analyzer on my smartphone (I have both an iPhone and a Samsung Nexus S running Android). I have done basic DSP in Matlab previously.

这是我的理解,我需要执行FFT获得信号的基频。

From my understanding, I need to perform an FFT to get the fundamental frequencies of a signal.

所以,现在,我想品尝麦克风44100赫兹。如果我使用的样本量512的滑动窗口重叠50%,这意味着我需要做的FFT每256个样品,或0.00580秒。

So now, I would like to sample the microphone at 44100 Hz. If I use a sliding window of sample size 512 with 50% overlap, that means I need to do an FFT every 256 samples, or 0.00580 seconds.

那速度似乎非常高,尤其是如果我计划在Java中为Android。请问我的智能手机能够处理的速度?据我所知,您可以在C / C ++的Andr​​oid程序,但我想与Java保持它暂且。

That rate seems really high, particularly if I program in Java for Android. Will my smartphone be able to handle that speed? I am aware that you can program in C/C++ on Android, but I would like to keep it with Java for the time being.

推荐答案

执行实数到复数FFT需要约5/2 N LG电子ñ浮点运算(加法和乘法)。在你的情况下,N = 512,那么:

Performing a real-to-complex FFT requires ~5/2 n lg n floating-point operations (additions and multiplications). In your case, n=512, so:

flops per fft ~= (5/2) * 512 * 9 = 11520

所以,每秒172的FFT需要每秒200万次浮点运算。这听起来好像很多,但它确实是没有那么多。典型的ARMv7级智能手机的硬件能够数亿或数十亿次浮点运算每秒的。

So 172 ffts per second requires about 2 million floating-point operations per second. That sounds like a lot, but it really isn't that many. The hardware of a typical armv7-class smartphone is capable of hundreds of millions or billions of floating-point operations per second.

但是请注意,你会希望有一个精心编写高性能的FFT;写得不好的FFT非常费电。在iPhone上,你可以使用加速架构(内置于操作系统,并提供了SDK),它提供了一个很好的一套FFT功能;我不知道什么是在Android。

Note however that you will want to have a carefully-written high-performance FFT; poorly written FFTs are notoriously inefficient. On the iPhone, you can use the Accelerate framework (built right into the OS, and available in the SDK), which provides a nice set of FFT functions; I'm not sure what's available on Android.

这篇关于我有多少的FFT每秒可以做我的智能手机? (用于执行语音识别)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆