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?

有帮助吗?

解决方案

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.

enter image description here

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top