这段代码有什么问题X_train, sr_X_train = librosa.load(X_Train()) Y_train, sr_Y_train = librosa.load(Y_Train()) X_test, sr_X_test = librosa.load(X_Test()) Y_test, sr_Y_test = librosa.load(Y_Test()) spectrogram = librosa.feature.melspectrogram(y=X_train, sr=sr_train, n_mels=128, fmax=8000) spectrogram = librosa.power_to_db(spectrogram, ref=np.max)
时间: 2023-05-19 08:05:51 浏览: 282
bp_train.rar_train_神经网络 matlab
这段代码中有一个问题,spectrogram = librosa.feature.melspectrogram(y=X_train, sr=sr_train, n_mels=128, fmax=8000)中的sr_train应该改为sr_X_train,因为之前的变量名是sr_X_train而不是sr_train。
阅读全文