Realtime microphone sound level monitoring

人走茶凉 提交于 2019-12-03 07:32:35

问题


I'm trying to access sound volume data from the microphone in realtime. I've tried AVAudioPlayer but it only monitors sounds from a source like an mp3 and not from a microphone. I've also tried The SpeakHere app but it's proving to be much tougher to understand with all the Objective C++ syntax (i'm a newbie). Is there another class similiar to the one in SpeakHere but written only in Objective C?


回答1:


sc_listener is deprecated. The correct answer today is to use AVAudioRecorder. This tutorial explains how to use it.





回答2:


Erik's answer is correct. Here is a reusable implementation using this method as a recognizer/delegate.

https://github.com/picciano/iOS-Audio-Recoginzer



来源:https://stackoverflow.com/questions/1155010/realtime-microphone-sound-level-monitoring

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!