Add tqdm progress bar

This commit is contained in:
Artrajz 2024-02-12 18:52:37 +08:00
parent d82f6bbb98
commit 3be2defcc7
3 changed files with 14 additions and 11 deletions

View File

@ -79,7 +79,7 @@ if os.path.exists(txt_path) == False:
return phone_level_feature.T
def process(data, res):
for name, text, lan in data:
for name, text, lan in tqdm(data, desc="Processing"):
try:
name = os.path.basename(name)
phones, word2ph, norm_text = clean_text(

View File

@ -1,6 +1,9 @@
# -*- coding: utf-8 -*-
import sys,os
from tqdm import tqdm
inp_text= os.environ.get("inp_text")
inp_wav_dir= os.environ.get("inp_wav_dir")
exp_name= os.environ.get("exp_name")
@ -94,11 +97,11 @@ def name2go(wav_name,wav_path):
with open(inp_text,"r",encoding="utf8")as f:
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:
# wav_name,text=line.split("\t")
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_path = "%s/%s" % (inp_wav_dir, wav_name)

View File

@ -81,7 +81,7 @@ if os.path.exists(semantic_path) == False:
lines = f.read().strip("\n").split("\n")
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)
try:
# wav_name,text=line.split("\t")