prophesier / diff-svc

Singing Voice Conversion via diffusion model
GNU Affero General Public License v3.0
2.61k stars 799 forks source link

librosa api change #69

Open emptylsjl opened 1 year ago

emptylsjl commented 1 year ago

File "D:\clone\ml\vits\diff-svc\network\hubert\hubert_model.py", line 240, in get_units
wav16 = librosa.resample(wav, sr, 16000)
TypeError: resample() takes 1 positional argument but 3 were given

call to resample should be wav16 = librosa.resample(wav, orig_sr=sr, target_sr=16000) in newer version of librosa

also whats weird is that, multiple call to librosa.resample have key specifiy and others do not like the call in vec_model.py line 28 and nvSTFT.py line 41 audio = librosa.resample(audio, orig_sr=sampling_rate, target_sr=16000) data = torch.from_numpy(librosa.core.resample(data.numpy(), orig_sr=sampling_rate, target_sr=target_sr))

vangmang2 commented 5 months ago

same issue here, did you solve it?

emptylsjl commented 5 months ago

same issue here, did you solve it?

the solution is posted along with the issue change librosa.resample(wav, sr, 16000) to librosa.resample(wav, orig_sr=sr, target_sr=16000)