我可以在 html5 中抓取唯一大于某个级别的声音吗?
Can i Grab the only sound louder than a certain level in html5?
我只需要捕捉大于特定级别的声音。
可能吗?
我现在想 getUserMedia
,但还没有找到解决这种情况的任何信息。
是的,您可以使用 Web Audio 来检测音量级别(我做了一个代码示例:https://github.com/cwilso/volume-meter), and use that to switch on recording of a sound (e.g. using the relatively new MediaRecorder API, or a library like RecorderJS (https://github.com/mattdiamond/Recorderjs)。您需要自己做出一堆代码决定(比如,它会自动关闭吗?什么级别打开它?瞬时音量级别,还是一段时间内的平均音量?)
我只需要捕捉大于特定级别的声音。 可能吗?
我现在想 getUserMedia
,但还没有找到解决这种情况的任何信息。
是的,您可以使用 Web Audio 来检测音量级别(我做了一个代码示例:https://github.com/cwilso/volume-meter), and use that to switch on recording of a sound (e.g. using the relatively new MediaRecorder API, or a library like RecorderJS (https://github.com/mattdiamond/Recorderjs)。您需要自己做出一堆代码决定(比如,它会自动关闭吗?什么级别打开它?瞬时音量级别,还是一段时间内的平均音量?)