【发布时间】:2020-12-07 11:57:10
【问题描述】:
我已经运行了下面的代码,它一直给我属性错误;
import noisereduce as nr
from scipy.io import wavfile
from noisereduce import reduce_n
# load data
rate, data = wavfile.read("output.wav")
# select section of data that is noise
noisy_part = data[10000:15000]
# perform noise reduction
reduced_noise = nr.reduce_noise(audio_clip=data, noise_clip=noisy_part, verbose=True)
它给出了下面的属性错误
AttributeError: module 'noisereduce' has no attribute 'reduce_noise'
【问题讨论】:
-
如果您的文件名是“noisereduce.py”,代码将自行导入并引发此问题
-
哦,非常感谢,已修复
-
好,请把我的答案添加为有用
-
@eyal 您没有发布答案。