Merge pull request #3 from candlewill/patch-1

specify encoding method
pull/2/head
Keith Ito 2017-07-17 13:28:59 -04:00 committed by GitHub
commit 7ebe9ba6bc
1 changed files with 1 additions and 1 deletions

View File

@ -9,7 +9,7 @@ def build_from_path(in_dir, out_dir, num_workers=1, tqdm=lambda x: x):
executor = ProcessPoolExecutor(max_workers=num_workers) executor = ProcessPoolExecutor(max_workers=num_workers)
futures = [] futures = []
index = 1 index = 1
with open(os.path.join(in_dir, 'metadata.csv')) as f: with open(os.path.join(in_dir, 'metadata.csv'), encoding="utf-8") as f:
for line in f: for line in f:
parts = line.strip().split('|') parts = line.strip().split('|')
wav_path = os.path.join(in_dir, 'wavs', '%s.wav' % parts[0]) wav_path = os.path.join(in_dir, 'wavs', '%s.wav' % parts[0])