Skip to content

Commit

Permalink
Fix download in LibriCSS recipe (#1148)
Browse files Browse the repository at this point in the history
* add transform attribute for MixedCut

* add mix_first option in normalize_loudness

* handle the case when mix is called on MixedCut with existing transforms

* add test for mixing with transformed MixedCut

* enhancements and bug fixes

* small changes in some cutset methods

* small fix in error message

* return word alignments from ami recipe

* add word alignments for ICSI

* remove unwanted whitespace

* fix IHM preparation

* remove words with zero or negative duration

* ensure word alignments respect segment boundary

* add save-to-wav option for icsi

* add test for mixing cut with recording

* style fix

* add data prep for voxpopuli

* small changes in recipes

* changes for max segment duration

* remove extra code

* add alignment scores from CTM

* minor change

* made suggested changes

* apply change to multi custom merge func

* remove old code

* fix failing tests

* add tests for trim to alignments with max segment duration

* add tests for merge supervisions

* fix bug in eval2000

* remove storing unnecessary things

* add fix_manifests for all recipes

* fix unzipping
  • Loading branch information
desh2608 committed Sep 14, 2023
1 parent 4d6d9c9 commit 46cb545
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lhotse/recipes/libricss.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,13 @@
import json
import logging
import subprocess
import zipfile
from collections import defaultdict
from pathlib import Path
from typing import Dict, Union

from tqdm import tqdm

from lhotse import (
CutSet,
RecordingSet,
Expand Down Expand Up @@ -120,7 +123,9 @@ def download_libricss(target_dir: Pathlike, force_download: bool = False) -> Pat
# Extract the zipped file
if not corpus_dir.exists() or force_download:
logging.info(f"Extracting {corpus_zip} to {target_dir}")
corpus_zip.unzip(target_dir)
with zipfile.ZipFile(corpus_zip, "r") as corpus_zip:
for member in tqdm(corpus_zip.infolist(), desc="Extracting"):
corpus_zip.extract(member, target_dir)

return target_dir

Expand Down

0 comments on commit 46cb545

Please sign in to comment.