NaJeongMo / Colaboratory-Notebook-for-Ultimate-Vocal-Remover

Colaboratory Notebook for Ultimate Vocal Remover
88 stars 28 forks source link

Error - please help #7

Open imjakedeason opened 6 months ago

imjakedeason commented 6 months ago

Everything worked for me for months and I haven't changed anything, and now I'm getting an error:

Window size: 512
Model: HP2-4BAND-3090_4band_arch-500m_1
Parameter: 4band_44100
Aggressiveness: 0.3
High end process: mirroring2
TTA: False
Deep Extraction: False

Multiple files detected.
---------------------------------------------------------------
Now processing: track1
with HP2-4BAND-3090_4band_arch-500m_1.pth
loading model... done
stft of wave source... Traceback (most recent call last):
  File "/content/drive/MyDrive/VocalRemover5-COLAB_arch/main.py", line 307, in <module>
    main()
  File "/content/drive/MyDrive/VocalRemover5-COLAB_arch/main.py", line 293, in main
    multi_file(useModel, args.input)
  File "/content/drive/MyDrive/VocalRemover5-COLAB_arch/main.py", line 244, in multi_file
    process.inference()
  File "/content/drive/MyDrive/VocalRemover5-COLAB_arch/main.py", line 94, in inference
    X_spec_m, input_high_end_h, input_high_end = spec_utils.loadWave(self.input, mp, hep=self.hep)
  File "/content/drive/MyDrive/VocalRemover5-COLAB_arch/lib/spec_utils.py", line 14, in loadWave
    X_wave[bands_n+1], _ = librosa.load(
  File "/usr/local/lib/python3.10/dist-packages/librosa/util/decorators.py", line 104, in inner_f
    return f(**kwargs)
  File "/usr/local/lib/python3.10/dist-packages/librosa/core/audio.py", line 183, in load
    y = resample(y, orig_sr=sr_native, target_sr=sr, res_type=res_type)
  File "/usr/local/lib/python3.10/dist-packages/librosa/util/decorators.py", line 88, in inner_f
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/librosa/core/audio.py", line 607, in resample
    import samplerate
ModuleNotFoundError: No module named 'samplerate'
Notebook took: 12.9s
kangdenglin commented 6 months ago

downgrade the samplerate module pip install samplerate==0.1.0

imjakedeason commented 6 months ago

downgrade the samplerate module pip install samplerate==0.1.0

thank you, it worked

fu-wen-bin commented 5 months ago

downgrade the samplerate module pip install samplerate==0.1.0

i got this error massage, plz help,thanks soooo much!

stft of wave source... done
100% 83/83 [00:41<00:00,  2.01it/s]
100% 84/84 [00:43<00:00,  1.94it/s]
Traceback (most recent call last):
  File "/content/drive/MyDrive/VocalRemover5-COLAB_arch/main.py", line 307, in <module>
    main()
  File "/content/drive/MyDrive/VocalRemover5-COLAB_arch/main.py", line 302, in main
    process.inference()
  File "/content/drive/MyDrive/VocalRemover5-COLAB_arch/main.py", line 122, in inference
    y_wave = spec_utils.cmb_spectrogram_to_wave(y_spec_m, mp, input_high_end_h, input_high_end_)  
  File "/content/drive/MyDrive/VocalRemover5-COLAB_arch/lib/spec_utils.py", line 340, in cmb_spectrogram_to_wave
    wave = librosa.resample(spectrogram_to_wave(spec_s, bp['hl'], mp, False), bp['sr'], sr, res_type="sinc_fastest")
  File "/content/drive/MyDrive/VocalRemover5-COLAB_arch/lib/spec_utils.py", line 297, in spectrogram_to_wave
    wave_left = librosa.istft(spec_left, hop_length=hop_length)
  File "/usr/local/lib/python3.10/dist-packages/librosa/util/decorators.py", line 88, in inner_f
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/librosa/core/spectrum.py", line 394, in istft
    dtype = util.dtype_c2r(stft_matrix.dtype)
  File "/usr/local/lib/python3.10/dist-packages/librosa/util/decorators.py", line 88, in inner_f
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/librosa/util/utils.py", line 2185, in dtype_c2r
    np.dtype(complex): np.dtype(np.float).type,
  File "/usr/local/lib/python3.10/dist-packages/numpy/__init__.py", line 319, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself.
Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'cfloat'?
Notebook took: 112.1s
kangdenglin commented 5 months ago

You probably want to specify all libsora's functions parameters in lib/spec_utils.py For example, the line 15, after clarifying which parameter the value belongs to: inp, sr=mp.param['band'][bands_n+1]['sr'], mono=False, dtype=np.float32, res_type=mp.param['band'][bands_n+1]['res_type'])

fu-wen-bin commented 5 months ago

你可能想在 lib/spec_utils.py 中指定所有 libsora 的函数参数, 例如第 15 行,在明确该值属于哪个参数后: inp, sr=mp.param['band'][bands_n+1]['sr'], mono=False, dtype=np.float32, res_type=mp.param['band'][bands_n+1]['res_type'])

Sorry, I'm a novice and I just started using this program. I don't quite understand what you mean by line 15. I didn't see your example in the error massage either. Does that mean I have to change the source code?

kangdenglin commented 5 months ago

yes

fu-wen-bin commented 5 months ago

Sorry to bother you again. I can't understand the code of this project. I just want to use this tool to separate the audio. Can you tell me how to change the code in detail? It doesn't matter if you don't want to. Thank you very much!!!