specify encoding method

specify encoding method
pull/2/head
Yunchao He 2017-07-17 22:53:06 +08:00 committed by GitHub
parent cdcca53f54
commit 1cfac99798
1 changed files with 1 additions and 1 deletions

View File

@ -23,7 +23,7 @@ def preprocess_ljspeech(args):
def write_metadata(metadata, out_dir):
with open(os.path.join(out_dir, 'train.txt'), 'w') as f:
with open(os.path.join(out_dir, 'train.txt'), 'w', encoding="utf-8") as f:
for m in metadata:
f.write('|'.join([str(x) for x in m]) + '\n')
frames = sum([m[2] for m in metadata])