Poor quality microphones record current and a buzzing background sound when recording , The purpose of noise reduction can be achieved by sampling the noise and removing the frequency .

Main steps :

1. Noise sampling

2. Statistical frequency

3. Removal frequency

The code is as follows :
''' Sampling noise reduction ''' def test2(n, y, sr): indexs = librosa.effects.split(y, top_db=25-n)
noicefrequencies = [] for i in indexs: frequencies, D =
librosa.ifgram(y[i[0]:i[1]], sr=sr, n_fft=22000) frequencies =
frequencies.astype(int) noicefrequencies += frequencies.flatten().tolist() c =
Counter(noicefrequencies) noicefrequencies = set(map(lambda x: x[0] // 2 * 2,
c.most_common(400))) frequencies, D = librosa.ifgram(y, sr=sr) tempD =
D.copy().astype(int) tempD = tempD // 2 * 2 count = 0 for i in
range(D.shape[0]): for j in range(D.shape[1]): if tempD[i][j] in
noicefrequencies: count += 1 D[i][j] = 0 print(count) return librosa.istft(D)

 

Technology
©2020 ioDraw All rights reserved
Swing actual combat Understanding closure about vue in el-date-picker type=daterange The problem of date not echoing Ubuntu 18.04 swap Partition expansion Snake code --c Language Edition visual c++6.0 open 【Golang Basic series 10 】Go language On conditional sentences ifString class —— summary ,String The nature of , Memory resolution , Commonly used APIAdobe Illustrator Publish native support Apple Silicon Test version of the software study java My first class antd table sort