Update extract_features.py

linear_len is undefined if args.only_mel is set
This commit is contained in:
Bajibabu Bollepalli 2018-12-18 15:50:44 +02:00 committed by GitHub
parent dce5a05e80
commit a97e4b2884
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -82,13 +82,13 @@ if __name__ == "__main__":
linear_len = linear.shape[1] linear_len = linear.shape[1]
np.save(linear_path, linear, allow_pickle=False) np.save(linear_path, linear, allow_pickle=False)
output.insert(2, linear_path+".npy") output.insert(2, linear_path+".npy")
assert mel_len == linear_len
if args.process_audio: if args.process_audio:
audio_file = file_name + "_audio" audio_file = file_name + "_audio"
audio_path = os.path.join(CACHE_PATH, 'audio', audio_file) audio_path = os.path.join(CACHE_PATH, 'audio', audio_file)
np.save(audio_path, x, allow_pickle=False) np.save(audio_path, x, allow_pickle=False)
del output[0] del output[0]
output.insert(0, audio_path+".npy") output.insert(0, audio_path+".npy")
assert mel_len == linear_len
return output return output