Skip to content

minor fix for the AMI recipe #1178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions lhotse/recipes/ami.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,17 @@ def download_audio(
wav_dir = target_dir / "wav_db" / item / "audio"
wav_dir.mkdir(parents=True, exist_ok=True)
wav_path = wav_dir / wav_name
resumable_download(
wav_url, filename=wav_path, force_download=force_download
)
try:
resumable_download(
wav_url, filename=wav_path, force_download=force_download
)
except urllib.error.HTTPError as err:
if err.code == 404:
logging.warning(
f"{wav_url} does not exist. Skipping this file."
)
else:
raise err
elif mic == "mdm8-bf":
wav_name = f"{item}_MDM8.wav"
wav_url = f"{url}/AMICorpusMirror/amicorpus/beamformed/{item}/{wav_name}"
Expand Down