我在anaconda中使用librosa 0.6,并且我也安装了ffmpeg,但是我仍然收到这个错误
代码是
a = np.exp(spectrum) - 1
p = 2 * np.pi * np.random.random_sample(spectrum.shape) - np.pi
for i in range(50):
S = a * np.exp(1j * p)
x = librosa.istft(S)
p = np.angle(librosa.stft(x, N_FFT))
librosa.output.write_wav(outfile, x, sr)
librosa.output
在librosa版本0.8.0中被删除。这记录在their changelog中。 所以您的问题最可能的原因是您正在使用这个新版本的librosa(而不是版本0.6.x)。您可以通过执行print(librosa.__version__)
进行验证对于ModenLibrosa,您应该使用soundfile.write来编写音频输出
你可以用这个来代替
请在此处查看更多https://pysoundfile.readthedocs.io/en/0.8.1/#soundfile.write
相关问题 更多 >
编程相关推荐