for i, line in enumerate(tqdm(data)):
audio_path = os.path.join(src_dir, line.strip())
if not os.path.exists(audio_path):
audio_path = line.strip()
assert os.path.exists(audio_path), \
"audio path %s not found" % (line.strip())
After Change
data = cls._read_file(data)
for i, line in enumerate(tqdm(data)):
line = line.decode("utf-8").strip()
audio_path = os.path.join(src_dir, line)
if not os.path.exists(audio_path):
audio_path = line