mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-10-07 07:02:57 +08:00
Add tqdm progress bar
This commit is contained in:
parent
d82f6bbb98
commit
3be2defcc7
@ -79,7 +79,7 @@ if os.path.exists(txt_path) == False:
|
|||||||
return phone_level_feature.T
|
return phone_level_feature.T
|
||||||
|
|
||||||
def process(data, res):
|
def process(data, res):
|
||||||
for name, text, lan in data:
|
for name, text, lan in tqdm(data, desc="Processing"):
|
||||||
try:
|
try:
|
||||||
name = os.path.basename(name)
|
name = os.path.basename(name)
|
||||||
phones, word2ph, norm_text = clean_text(
|
phones, word2ph, norm_text = clean_text(
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import sys,os
|
import sys,os
|
||||||
|
|
||||||
|
from tqdm import tqdm
|
||||||
|
|
||||||
inp_text= os.environ.get("inp_text")
|
inp_text= os.environ.get("inp_text")
|
||||||
inp_wav_dir= os.environ.get("inp_wav_dir")
|
inp_wav_dir= os.environ.get("inp_wav_dir")
|
||||||
exp_name= os.environ.get("exp_name")
|
exp_name= os.environ.get("exp_name")
|
||||||
@ -94,26 +97,26 @@ def name2go(wav_name,wav_path):
|
|||||||
with open(inp_text,"r",encoding="utf8")as f:
|
with open(inp_text,"r",encoding="utf8")as f:
|
||||||
lines=f.read().strip("\n").split("\n")
|
lines=f.read().strip("\n").split("\n")
|
||||||
|
|
||||||
for line in lines[int(i_part)::int(all_parts)]:
|
for line in tqdm(lines[int(i_part)::int(all_parts)], desc="Processing"):
|
||||||
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("|")
|
||||||
if (inp_wav_dir !=None):
|
if inp_wav_dir is not None:
|
||||||
wav_name = os.path.basename(wav_name)
|
wav_name = os.path.basename(wav_name)
|
||||||
wav_path = "%s/%s"%(inp_wav_dir, wav_name)
|
wav_path = "%s/%s" % (inp_wav_dir, wav_name)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
wav_path=wav_name
|
wav_path = wav_name
|
||||||
wav_name = os.path.basename(wav_name)
|
wav_name = os.path.basename(wav_name)
|
||||||
name2go(wav_name,wav_path)
|
name2go(wav_name, wav_path)
|
||||||
except:
|
except:
|
||||||
print(line,traceback.format_exc())
|
print(line, traceback.format_exc())
|
||||||
|
|
||||||
if(len(nan_fails)>0 and is_half==True):
|
if(len(nan_fails)>0 and is_half==True):
|
||||||
is_half=False
|
is_half = False
|
||||||
model=model.float()
|
model = model.float()
|
||||||
for wav_name in nan_fails:
|
for wav_name in nan_fails:
|
||||||
try:
|
try:
|
||||||
name2go(wav_name)
|
name2go(wav_name)
|
||||||
except:
|
except:
|
||||||
print(wav_name,traceback.format_exc())
|
print(wav_name, traceback.format_exc())
|
||||||
|
@ -81,7 +81,7 @@ if os.path.exists(semantic_path) == False:
|
|||||||
lines = f.read().strip("\n").split("\n")
|
lines = f.read().strip("\n").split("\n")
|
||||||
|
|
||||||
lines1 = []
|
lines1 = []
|
||||||
for line in lines[int(i_part) :: int(all_parts)]:
|
for line in tqdm(lines[int(i_part) :: int(all_parts)], desc="Processing"):
|
||||||
# print(line)
|
# print(line)
|
||||||
try:
|
try:
|
||||||
# wav_name,text=line.split("\t")
|
# wav_name,text=line.split("\t")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user