提高 Android 录音质量?
有什么方法可以录制高质量的音频吗?
我如何读取用户所说的信息?在录音应用程序中,您可以看到这样的指示器(我不知道它的正确名称)。
Is there any way to record audio in high quality?
And how can I read information that user is saying something? In Audio Recording application you can see such indicator (I don't know the right name for it).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
目前,Android 上录制音频质量不佳的一个重要原因是 MediaRecorder 类使用的编解码器(AMR-NB 编解码器)。但是,您可以通过 AudioRecord 类访问未压缩的音频,并将其直接录制到文件中。
排练助手应用执行此操作,将未压缩的音频保存到 WAV 文件中 - 请查看RehearsalAudioRecord 类源代码。
RehearsalAudioRecord 类还提供了 getMaxAmplitude 方法,您可以使用该方法来检测自上次调用该方法以来的最大音频级别(MediaRecorder 也提供此方法)。
At the moment, a big reason for poor audio quality recording on Android is the codec used by the MediaRecorder class (the AMR-NB codec). However, you can get access to uncompressed audio via the AudioRecord class, and record that into a file directly.
The Rehearsal Assistant app does this to save uncompressed audio into a WAV file - take a look at the RehearsalAudioRecord class source code.
The RehearsalAudioRecord class also provides a getMaxAmplitude method, which you can use to detect the maximum audio level since the last time you called the method (MediaRecorder also provides this method).
对于录音和监控:您可以使用录音机活动。
以下是一段代码:
有关如何录制包括输入监视器的音频的完美工作示例,请下载开源 Ringdroid 项目:https://github.com/google/ringdroid
查看屏幕截图,您会看到监视器。
为了使音频质量更高,您需要更好的麦克风。内置麦克风只能捕获这么多(这不太好)。再次查看ringdroid 项目,从那里收集一些信息。此时,您可以实施一些标准化和放大例程来改善声音。
For recording and monitoring: You can use the sound recorder activity.
Here's a snippet of code:
For a perfect working example of how to record audio which includes an input monitor, download the open source Ringdroid project: https://github.com/google/ringdroid
Look at the screenshots and you'll see the monitor.
For making the audio higher quality, you'd need a better mic. The built in mic can only capture so much (which is not that good). Again, look at the ringdroid project, glean some info from there. At that point you could implement some normalization and amplification routines to improve the sound.
我给你一个简单的答案。
所以,对于安卓手机,只需将音频比特率设置得更大,你就会得到更好的质量。
I give you a simple answer.
So, for android phones, just set the audio bit rate bigger, you will get the better quality.