init
Browse files- download_audio.py +3 -1
download_audio.py
CHANGED
@@ -72,7 +72,9 @@ def get_audio(url: str, filename: str):
|
|
72 |
def process_dataset(url_metadata):
|
73 |
df_metadata = get_metadata(url_metadata)
|
74 |
print(f"load metadata: {url_metadata}, ({len(df_metadata)} rows)")
|
75 |
-
inputs = [(
|
|
|
|
|
76 |
inputs = [x for x in inputs if not os.path.exists(p_join(cache_dir_root, "audio", x[1]))]
|
77 |
print(f"{len(inputs)} urls to download")
|
78 |
with Pool(n_pool) as pool:
|
|
|
72 |
def process_dataset(url_metadata):
|
73 |
df_metadata = get_metadata(url_metadata)
|
74 |
print(f"load metadata: {url_metadata}, ({len(df_metadata)} rows)")
|
75 |
+
inputs = [(
|
76 |
+
r['url'], f"{r['id']}.{r['direction']}.{r['side']}.{os.path.basename(r['url'])}"
|
77 |
+
) for _, r in df_metadata.iterrows()]
|
78 |
inputs = [x for x in inputs if not os.path.exists(p_join(cache_dir_root, "audio", x[1]))]
|
79 |
print(f"{len(inputs)} urls to download")
|
80 |
with Pool(n_pool) as pool:
|