如何检测的打击Android设备的麦克风 [英] How to detect blow in android device microphone

查看:749
本文介绍了如何检测的打击Android设备的麦克风的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何检测,当用户进入吹设备的麦克风?然后,这将被用于触发由该应用的一些动作。

How can I detect when the user blows into the device microphone? This would then be used to trigger some action by the app.

推荐答案

的,当用户吹入麦克风检测的工作是可分离成两个部分:(1)从麦克风获取输入和(2)听音一个吹的声音。 有人吹麦克风的噪音/声音由低频率的声音了。我们将使用一个低通滤波器来降低高频声音的麦克风进来;当滤波后的信号尖峰我们就知道谁家吹入麦克风的水平。

The job of detecting when a user blows into the microphone is separable into two parts: (1) taking input from the microphone and (2) listening for a blowing sound. The noise/sound of someone blowing into the mic is made up of low-frequency sounds. We’ll use a low pass filter to reduce the high frequency sounds coming in on the mic; when the level of the filtered signal spikes we’ll know someone’s blowing into the mic.

来源: <一href="http://mobileorchard.com/tutorial-detecting-when-a-user-blows-into-the-mic/">http://mobileorchard.com/tutorial-detecting-when-a-user-blows-into-the-mic/

修改 这里是一些小的 SoundMeter 的类Android版: <一href="http://$c$c.google.com/p/android-labs/source/browse/trunk/NoiseAlert/src/com/google/android/noisealert/SoundMeter.java?r=2">http://$c$c.google.com/p/android-labs/source/browse/trunk/NoiseAlert/src/com/google/android/noisealert/SoundMeter.java?r=2

EDIT And here is some small SoundMeter class for Android: http://code.google.com/p/android-labs/source/browse/trunk/NoiseAlert/src/com/google/android/noisealert/SoundMeter.java?r=2

这篇关于如何检测的打击Android设备的麦克风的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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