Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
Signed-off-by: begeekmyfriend <begeekmyfriend@gmail.com>
  • Loading branch information
begeekmyfriend committed Nov 1, 2018
1 parent 0e8f312 commit d0e790a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion datasets/preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,15 @@ def build_from_path(hparams, input_dirs, mel_dir, linear_dir, wav_dir, n_jobs=12
futures = []
index = 1
for input_dir in input_dirs:
trn_files = glob.glob(os.path.join(input_dir,"data", 'A*', '*.trn'))
trn_files = glob.glob(os.path.join(input_dir, "data", 'A*', '*.trn'))
for trn in trn_files:
with open(trn,encoding='utf-8') as f:
basename = trn[:-4]
text = None
if basename.endswith('.wav'):
# THCHS30
zhText = f.readline()
pinyinText = f.readline()
text = segment(zhText, pinyinText)
wav_file = basename
else:
Expand Down

0 comments on commit d0e790a

Please sign in to comment.