mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-04-06 03:57:44 +08:00
Add files via upload
This commit is contained in:
parent
e3ab9d8135
commit
6469048de1
@ -61,10 +61,9 @@ else:
|
|||||||
model = model.to(device)
|
model = model.to(device)
|
||||||
|
|
||||||
nan_fails=[]
|
nan_fails=[]
|
||||||
def name2go(wav_name):
|
def name2go(wav_name,wav_path):
|
||||||
hubert_path="%s/%s.pt"%(hubert_dir,wav_name)
|
hubert_path="%s/%s.pt"%(hubert_dir,wav_name)
|
||||||
if(os.path.exists(hubert_path)):return
|
if(os.path.exists(hubert_path)):return
|
||||||
wav_path="%s/%s"%(inp_wav_dir,wav_name)
|
|
||||||
tmp_audio = load_audio(wav_path, 32000)
|
tmp_audio = load_audio(wav_path, 32000)
|
||||||
tmp_max = np.abs(tmp_audio).max()
|
tmp_max = np.abs(tmp_audio).max()
|
||||||
if tmp_max > 2.2:
|
if tmp_max > 2.2:
|
||||||
@ -99,8 +98,13 @@ for line in lines[int(i_part)::int(all_parts)]:
|
|||||||
try:
|
try:
|
||||||
# wav_name,text=line.split("\t")
|
# wav_name,text=line.split("\t")
|
||||||
wav_name, spk_name, language, text = line.split("|")
|
wav_name, spk_name, language, text = line.split("|")
|
||||||
wav_name=os.path.basename(wav_name)
|
if (inp_wav_dir != ""):
|
||||||
name2go(wav_name)
|
wav_name = os.path.basename(wav_name)
|
||||||
|
wav_path = os.path.join(inp_wav_dir, wav_name)
|
||||||
|
else:
|
||||||
|
wav_path=wav_name
|
||||||
|
wav_name = os.path.basename(wav_name)
|
||||||
|
name2go(wav_name,wav_path)
|
||||||
except:
|
except:
|
||||||
print(line,traceback.format_exc())
|
print(line,traceback.format_exc())
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user