检测在Android的声音或声音开始 [英] Detect the beginning of a sound or voice in Android

查看:383
本文介绍了检测在Android的声音或声音开始的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想听听麦克风(我猜使用AudioRecord),并执行一些动作非常时刻的人开始说话。我知道我可以用AudioRecord缓冲声音,但我怎么分析呢?

I would like to listen to the mic (I guess using AudioRecord) and perform some action the very moment a person starts to speak. I know I can buffer audio with AudioRecord, but how do I analyze it ?

推荐答案

那么,困难的部分将越来越电话要认识到它的声音。可以设置代替麦克风,这可能是能够做到这一点的语音识别系统作为输入,。我不这么认为,但因为(我实际上阅读所有关于这个昨天)中的电话的实际上并没有做到认识,它只是打开了一个实时流(如电话)到谷歌的服务器,而且他们的认识。

Well, the difficult part will be getting the phone to recognize that it's voice. You can set the voice recognition system as the input, instead of the mic, which might be able to do that. I don't think so though, because (I actually read all about this yesterday) the phone doesn't actually do the recognizing, it just opens up a live stream (like a phone call) to the Google servers, and they do the recognizing.

另外,我已发现迄今指向Android不距麦克风支持的现场音频分析的结论的信息。所有这一切似乎是活的,这些其他应用程序实际上只是把一堆小样本并分析他们真的很快,这样他们似乎生活。一个500毫秒的样本每300毫秒似乎是共同的。

Also, the information that I have found so far points to the conclusion that Android does not support analysis of live audio from the mic. All these other apps that seem to be "live" are actually just taking a bunch of small samples and analyzing them really quickly so that they seem live. A 500 millisecond sample every 300 milliseconds seems to be common.

幸运的是,我的编程工作的一面,我也是一个录音师,所以我可以告诉你,(如果你愿意投入的工作)有一种方法来检测实际的声音,而不是仅仅声音。每个语音被分成频率上,所有这些都使我们听到的声音的几不同的传动比,而每个语音的比率仍pretty的恒定,而每个单独的语音的比率不同(这就是为什么基于语音密码工作)。所以,如果你能够采取的样本,将其分解成约10Hz的每一个频率,并观察各的幅度,而当你有看起来类似的声音,而不是仅仅白噪声的频率/幅度格局,你会在企业。 的那然而,似乎并不像它会是容易的。类似的事情也已经与所谓的SpectralView的应用程序,这显示音频频谱各个击破前完成。

Luckily, on the side of my programming job, I'm also a sound technician, so I can tell you that (if you were willing to put in the work) there is a way to detect actual voice as opposed to just sound. Every voice is split into a few distinct ratios of frequencies which all combine to make the voice we hear, and every voice's ratios remains pretty constant, while each individual voice's ratios are different (which is why voice-based passwords work). So, if you were able to take a sample, break it up into frequencies of about 10hz each, and watch for the amplitude of each, and when you got a frequency/amplitude pattern that looked similar to a voice instead of just "white noise", you'd be in business. DOING that however, doesn't seem like it'd be easy at all. Something similar has been done before with the app called SpectralView, which displays the audio spectrum all broken up.

另外,你可以通过语音搜索看到,一个声音也波动了很多它是多么响亮。你可以找这一点,但它不会是可靠的。

Also, as you can see by using the Voice Search, a voice also fluctuates a lot in how loud it is. You could look for that, but it wouldn't be as reliable.

在最后,如何的你分析一下?那么,你将不得不寻找在看起来像一个声音频率的模式。你是怎么做到的的?好了,说实话,我不知道是肯定的。抱歉。

In conclusion, how do you analyze it? Well, you would have to look for a pattern in the frequencies that looks like a voice. How do you do that? Well, to be honest, I don't know for sure. Sorry.

这篇关于检测在Android的声音或声音开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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