mirror of https://github.com/MycroftAI/mimic2.git
Use single quotes
parent
d49a938a71
commit
edd0925213
|
@ -23,7 +23,7 @@ def build_from_path(in_dir, out_dir, num_workers=1, tqdm=lambda x: x):
|
|||
executor = ProcessPoolExecutor(max_workers=num_workers)
|
||||
futures = []
|
||||
index = 1
|
||||
with open(os.path.join(in_dir, 'metadata.csv'), encoding="utf-8") as f:
|
||||
with open(os.path.join(in_dir, 'metadata.csv'), encoding='utf-8') as f:
|
||||
for line in f:
|
||||
parts = line.strip().split('|')
|
||||
wav_path = os.path.join(in_dir, 'wavs', '%s.wav' % parts[0])
|
||||
|
|
2
eval.py
2
eval.py
|
@ -50,5 +50,5 @@ def main():
|
|||
run_eval(args)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -23,7 +23,7 @@ def preprocess_ljspeech(args):
|
|||
|
||||
|
||||
def write_metadata(metadata, out_dir):
|
||||
with open(os.path.join(out_dir, 'train.txt'), 'w', encoding="utf-8") 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])
|
||||
|
|
Loading…
Reference in New Issue