深度学习 噪声抑制_使用深度学习抑制噪声

深度学习 噪声抑制

Image for post
Credits: Zoom
学分:缩放

At the time of boom of online video conferencing and virtual communication, the ability of a platform to suppress background noise plays a crucial roll to give it a leading edge. Platforms like Google Meet constantly use Machine Learning to perform noise suppression to provide the best audio quality possible. Today I will show you how you could make your own Deep Learning model to perform Noise Suppression

在在线视频会议和虚拟通信蓬勃发展之际,平台抑制背景噪声的能力发挥了至关重要的作用,从而使其具有领先优势。 像Google Meet这样的平台不断使用机器学习来执行噪声抑制,以提供最佳的音频质量。 今天,我将向您展示如何创建自己的深度学习模型来执行噪声抑制

抑制噪音有什么大不了的?(What’s the Big Deal with Noise Suppression?)

The task of Noise Suppression can be approached in a few different ways. These might include Generative Adversarial Networks (GAN’s), Embedding Based Models, Residual Networks, etc. Irrespective of the approach, there are two major problems with Noise Suppression

噪声抑制的任务可以通过几种不同的方法来解决。 这些可能包括生成对抗网络(GAN),基于嵌入的模型,残差网络等。不管采用哪种方法,噪声抑制都有两个主要问题

  1. Handling variable length audio sequences

    处理可变长度的音频序列

  2. Slow processing time resulting in lag

    缓慢的处理时间导致滞后

I will show you some basic methods in this article on how to deal with these problems

我将在本文中向您展示一些有关如何解决这些问题的基本方法

开始吧(Let’s Start)

We will first import our libraries. We will be using tensorflow. You are free to implement a PyTorch version of the same.

我们将首先导入我们的库。 我们将使用tensorflow。 您可以自由地实现相同的PyTorch版本。

import tensorflow as tf
from tensorflow.keras.layers import Conv1D,Conv1DTranspose,Concatenate,Input
import numpy as np
import IPython.display
import glob
from tqdm.notebook import tqdm
import librosa.display
import matplotlib.pyplot as plt

The data we will be using is a combination of Clean and Noisy audio samples of different sizes. The dataset is provided by University of Edinburgh and can be downloaded from here

我们将使用的数据是不同大小的Clean和Noisy音频样本的组合。 数据集由爱丁堡大学提供,可从此处下载

加载和可视化数据(Loading and Visualising the data)

We will use tensorflow’s tf.audio module to load our data. Using tf.audio() along with tf.io.read_file() has given me 50% faster loading times as compared to librosa.load() because of tensorflow using the GPU

我们将使用tensorflow的tf.audio模块加载我们的数据。 与librosa.load()相比,将tf.audio()与tf.io.read_file()结合使用可使我的加载时间缩短了50%,这是因为使用GPU进行了张量流

clean_sounds = glob.glob('/content/CleanData/*')
noisy_sounds = glob.glob('/content/NoisyData/*')


clean_sounds_list,_ = tf.audio.decode_wav(tf.io.read_file(clean_sounds[0]),desired_channels=1)
for i in tqdm(clean_sounds[1:]):
  so,_ = tf.audio.decode_wav(tf.io.read_file(i),desired_channels=1)
  clean_sounds_list = tf.concat((clean_sounds_list,so),0)


noisy_sounds_list,_ = tf.audio.decode_wav(tf.io.read_file(noisy_sounds[0]),desired_channels=1)
for i in tqdm(noisy_sounds[1:]):
  so,_ = tf.audio.decode_wav(tf.io.read_file(i),desired_channels=1)
  noisy_sounds_list = tf.concat((noisy_sounds_list,so),0)


clean_sounds_list.shape,noisy_sounds_list.shape

Here we load our individual audio files using tf.audio.decode_wav() and concatentate them to

  • 0
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值