如何自动使低于给定音量阈值的音频部分静音? [英] How to automatically silence sections of audio below a given volume threshold?

查看:43
本文介绍了如何自动使低于给定音量阈值的音频部分静音?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 C# 编写单声道音乐转录应用程序.我想将 WAV 文件的所有部分静音低于某个音量阈值.知道如何做到这一点吗?

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.

一个基本的噪声门通常会有一个包络跟随器来估计音频的音量.下图显示了一些音频(黑色)与包络(红色)重叠.当包络(红色)低于阈值时,音频将降低音量.音频可以降低到 0,但用于音乐制作的噪声门通常只会将音频降低固定范围(例如 50db).减少到零听起来不自然,完全没有声音/噪音会吸引听众的注意力.

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.

这篇关于如何自动使低于给定音量阈值的音频部分静音?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆