mirror of https://github.com/MycroftAI/mimic2.git
commit
7ebe9ba6bc
|
@ -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])
|
||||||
|
|
Loading…
Reference in New Issue