How to automatically silence sections of audio below a given volume threshold?

て烟熏妆下的殇ゞ 提交于 2019-12-11 08:37:29

问题


I'm coding a monophonic music transcription application using C#. I want to silence all parts of a WAV file below a certain volume threshold. Any idea how to do this?


回答1:


You need a Noise Gate. A noise gate is a type of audio effect that silences (or reduces in volume) any quiet sections that fall below a set volume threshold.

It would probably be easier to use an existing noise gate implementation rather then create your own. Understanding and implementing a basic noise gate isn't too difficult but there is no single correct way to do it. Any implementation will need to be carefully fine tuned for best results.

A basic noise gate will generally have an envelope follower that estimates the volume of the audio. The image below shows some audio (black) overlaid with an envelope (red). When the envelope (red) falls below a threshold value, the audio will be reduced in volume. The audio can be reduced to 0 but noise gates used for music production will often only reduce audio by a fixed range (for example 50db). Reducing down to zero can sound unnatural and the complete absence of sound/noise can attract the listeners attention.



来源:https://stackoverflow.com/questions/14635934/how-to-automatically-silence-sections-of-audio-below-a-given-volume-threshold

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