From 3daca6f209a2bf967b3438e444dcfdd76eceeecd Mon Sep 17 00:00:00 2001 From: GaGo <58830501+GoldschmittGabriel@users.noreply.github.com> Date: Thu, 23 Apr 2020 14:45:39 +0200 Subject: [PATCH] Update import_swc.py I tried to use the importer. With the Error path not defined. I think it's appear after the refactor by @reuben. Nothing big, but I think an commit worth. :) --- bin/import_swc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/import_swc.py b/bin/import_swc.py index abd0889f..d19f7c3e 100755 --- a/bin/import_swc.py +++ b/bin/import_swc.py @@ -268,7 +268,7 @@ def collect_samples(base_dir, language): bar = progressbar.ProgressBar(max_value=len(roots), widgets=SIMPLE_BAR) for root in bar(roots): wav_path = os.path.join(root, WAV_NAME) - aligned = ET.parse(path.join(root, ALIGNED_NAME)) + aligned = ET.parse(os.path.join(root, ALIGNED_NAME)) article = UNKNOWN speaker = UNKNOWN for prop in aligned.iter("prop"): @@ -351,7 +351,7 @@ def maybe_convert_one_to_wav(entry): output_wav = os.path.join(root, WAV_NAME) if os.path.isfile(output_wav): return - files = sorted(glob(path.join(root, AUDIO_PATTERN))) + files = sorted(glob(os.path.join(root, AUDIO_PATTERN))) try: if len(files) == 1: transformer.build(files[0], output_wav)