1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
diff --git a/gui_data/app_size_values.py b/gui_data/app_size_values.py
index 85c3ad4..5d6e912 100644
--- a/gui_data/app_size_values.py
+++ b/gui_data/app_size_values.py
@@ -132,7 +132,7 @@ class ImagePath():
if size is not None:
size = (int(size[0]), int(size[1]))
if keep_aspect:
- img = img.resize((size[0], int(size[0] * ratio)), Image.ANTIALIAS)
+ img = img.resize((size[0], int(size[0] * ratio)), Image.LANCZOS)
else:
img = img.resize(size, Image.ANTIALIAS)
diff --git a/install_packages.sh b/install_packages.sh
old mode 100644
new mode 100755
diff --git a/lib_v5/spec_utils.py b/lib_v5/spec_utils.py
index 8ec520d..5c2fe7c 100644
--- a/lib_v5/spec_utils.py
+++ b/lib_v5/spec_utils.py
@@ -271,8 +271,8 @@ def wave_to_spectrogram(wave, hop_length, n_fft, mp, band, is_v51_model=False):
wave_left = np.asfortranarray(wave[0])
wave_right = np.asfortranarray(wave[1])
- spec_left = librosa.stft(wave_left, n_fft, hop_length=hop_length)
- spec_right = librosa.stft(wave_right, n_fft, hop_length=hop_length)
+ spec_left = librosa.stft(wave_left, n_fft=n_fft, hop_length=hop_length)
+ spec_right = librosa.stft(wave_right, n_fft=n_fft, hop_length=hop_length)
spec = np.asfortranarray([spec_left, spec_right])
@@ -337,7 +337,7 @@ def cmb_spectrogram_to_wave(spec_m, mp, extra_bins_h=None, extra_bins=None, is_v
spec_s *= get_lp_filter_mask(spec_s.shape[1], bp['lpf_start'], bp['lpf_stop'])
else:
spec_s = fft_lp_filter(spec_s, bp['lpf_start'], bp['lpf_stop'])
- wave = librosa.resample(spectrogram_to_wave(spec_s, bp['hl'], mp, d, is_v51_model), bp['sr'], sr, res_type=wav_resolution)
+ wave = librosa.resample(spectrogram_to_wave(spec_s, bp['hl'], mp, d, is_v51_model), orig_sr=bp['sr'], target_sr=sr, res_type=wav_resolution)
else: # mid
if is_v51_model:
spec_s *= get_hp_filter_mask(spec_s.shape[1], bp['hpf_start'], bp['hpf_stop'] - 1)
@@ -347,7 +347,7 @@ def cmb_spectrogram_to_wave(spec_m, mp, extra_bins_h=None, extra_bins=None, is_v
spec_s = fft_lp_filter(spec_s, bp['lpf_start'], bp['lpf_stop'])
wave2 = np.add(wave, spectrogram_to_wave(spec_s, bp['hl'], mp, d, is_v51_model))
- wave = librosa.resample(wave2, bp['sr'], sr, res_type=wav_resolution)
+ wave = librosa.resample(wave2, orig_sr=bp['sr'], target_sr=sr, res_type=wav_resolution)
return wave
diff --git a/separate.py b/separate.py
index 864473e..4b1057c 100644
--- a/separate.py
+++ b/separate.py
@@ -1104,7 +1104,7 @@ class SeperateVR(SeperateAttributes):
wav_resolution = bp['res_type']
if d == bands_n: # high-end band
- X_wave[d], _ = librosa.load(audio_file, bp['sr'], False, dtype=np.float32, res_type=wav_resolution)
+ X_wave[d], _ = librosa.load(audio_file, sr=bp['sr'], mono=False, dtype=np.float32, res_type=wav_resolution)
X_spec_s[d] = spec_utils.wave_to_spectrogram(X_wave[d], bp['hl'], bp['n_fft'], self.mp, band=d, is_v51_model=self.is_vr_51_model)
if not np.any(X_wave[d]) and is_mp3:
@@ -1113,7 +1113,7 @@ class SeperateVR(SeperateAttributes):
if X_wave[d].ndim == 1:
X_wave[d] = np.asarray([X_wave[d], X_wave[d]])
else: # lower bands
- X_wave[d] = librosa.resample(X_wave[d+1], self.mp.param['band'][d+1]['sr'], bp['sr'], res_type=wav_resolution)
+ X_wave[d] = librosa.resample(X_wave[d+1], orig_sr=self.mp.param['band'][d+1]['sr'], target_sr=bp['sr'], res_type=wav_resolution)
X_spec_s[d] = spec_utils.wave_to_spectrogram(X_wave[d], bp['hl'], bp['n_fft'], self.mp, band=d, is_v51_model=self.is_vr_51_model)
if d == bands_n and self.high_end_process != 'none':
|