How to get audio amplitude with speech recognizer?

泄露秘密 提交于 2019-12-06 11:56:45

The way to do it is to register a listener with the SpeechRecognizer and visualize the output of onRmsChanged. Note however that:

There is no guarantee that this method will be called.

So the speech recognizer that you are using needs to support this method. Note that the return value of SpeechRecognizer.createSpeechRecognizer(getActivity()) depends on the user's device's configuration.

(You cannot start an AudioRecord while the SpeechRecognizer is recording and vice versa.)

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