麦克风输入 [英] Microphone input

查看:168
本文介绍了麦克风输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图建立一个小工具,检测采用Android手枪射击。这对手枪射击训练辅助告诉你如何在镜头分布在时间的一部分,我用的是HTC纹身进行测试。

I'm trying to build a gadget that detects pistol shots using Android. It's a part of a training aid for pistol shooters that tells how the shots are distributed in time and I use a HTC Tattoo for testing.

我用的是MediaRecorder及其getMaxAmplitude方法在过去的1/100 s到获得最高幅度,但预期它不工作;演讲让我从getMaxAmplitude值从0至约25000,而手枪射击(或大叫!)只能达到约15000随着8kHz的采样频率应该与相当高的水平了一些样品。

I use the MediaRecorder and its getMaxAmplitude method to get the highest amplitude during the last 1/100 s but it does not work as expected; speech gives me values from getMaxAmplitude in the range from 0 to about 25000 while the pistol shots (or shouting!) only reaches about 15000. With a sampling frequency of 8kHz there should be some samples with considerably high level.

任何谁知道这些东西是如何工作的?是否有正在注册的最大振幅之前应用过滤器。如果是这样,它是硬件还是软件?

Anyone who knows how these things work? Are there filters that are applied before registering the max amplitude. If so, is it hardware or software?

谢谢,     /乔治

Thanks, /George

推荐答案

抱歉这么晚才反应;我没有看到这个问题,直到我开始寻找一个不同的问题...

Sorry for the late response; I didn't see this question until I started searching for a different problem...

我已经开始申请做什么,我想你尝试。这是一个基于音频的单圈计时器(按钮​​启动/停止录制,并大声音频噪声搭接设置)。这还没完,但可能会为你提供一个体面的基础开始。

I have started an application to do what I think you're attempting. It's an audio-based lap timer (button to start/stop recording, and loud audio noises for lap setting). It' not finished, but might provide you with a decent base to get started.

现在,它可以让你监控信号量从麦克风的到来,并设置环境噪声量。它也采用了新的BSD许可证,可以随意在这里检查出code:的 HTTP://$c$c.google.com/p/audio-timer/ 。它设置为使用1.5 API,包括尽可能多的设备尽可能。

Right now, it allows you to monitor the signal volume coming from the mic, and set the ambient noise amount. It's also using the new BSD license, so feel free to check out the code here: http://code.google.com/p/audio-timer/. It's set up to use the 1.5 API to include as many devices as possible.

这还不算完,因为它有两个主要问题:

It's not finished, in that it has two main issues:

  1. 音频捕获目前没有工作,因为不支持的频率要求模拟设备
  2. 在功能不起作用尚未计时器 - 是着眼于首先获得音频采集

我在寻找到频的支持,而Android似乎并不有一个办法,找出哪些频率没有试错每个设备都支持。

I'm looking into the frequency support, but Android doesn't seem to have a way to find out which frequencies are supported without trial and error per-device.

我也有我的本地dev的机器一些额外的code创建的列表视图项的布局以显示圈的信息。虽然通过频率的问题得到了牵制。但是,由于显示和音频捕获是pretty的多少事,使用该系统时填写的定时信息应该是比较简单的显示值,然后它应该不会太困难,增加出口数据的能力表到SD卡上的CSV。

I also have on my local dev machine some extra code to create a layout for the listview items to display "lap" information. Got sidetracked by the frequency problem though. But since the display and audio capture are pretty much done, using the system time to fill in the display values for timing information should be relatively straightforward, and then it shouldn't be too difficult to add the ability to export the data table to a CSV on the SD card.

让我知道如果你想加入这个项目,或者如果你有任何问题。

Let me know if you want to join this project, or if you have any questions.

这篇关于麦克风输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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