iOS xcode 麦克风音量检测?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6183416/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
iOS xcode microphone volume detection?
提问by Albert Renshaw
What frameworks are required to detect how loud someone is talking into a microphone... Also, can anyone tell me what to search for in the documentation or google so I can create some code... What line of code would be commonly used when detecting volume levels of noise through the microphone? Thanks!
需要什么框架来检测某人对着麦克风说话的声音有多大......另外,谁能告诉我在文档或谷歌中搜索什么,以便我可以创建一些代码......什么时候会常用哪一行代码通过麦克风检测噪音的音量水平?谢谢!
回答by Erik B
This seems to be a duplicate of:
这似乎是以下内容的重复:
Realtime microphone sound level monitoring
However, that question is old and the accepted answer links to a deprecated library. They now recommend that you instead use AVAudioRecorder
. They suggest this tutorialand it seems to be what you are looking for.
但是,这个问题很旧,接受的答案链接到已弃用的 library。他们现在建议您改为使用AVAudioRecorder
. 他们建议本教程,它似乎是您正在寻找的内容。