From 1cfac997989626d2f6c379171ccfead12128ca62 Mon Sep 17 00:00:00 2001 From: Yunchao He Date: Mon, 17 Jul 2017 22:53:06 +0800 Subject: [PATCH] specify encoding method specify encoding method --- preprocess.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preprocess.py b/preprocess.py index f7afcef..d6c469a 100644 --- a/preprocess.py +++ b/preprocess.py @@ -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])