Skip to content

Commit

Permalink
support eval track 1
Browse files Browse the repository at this point in the history
  • Loading branch information
yuekaizhang committed Dec 14, 2023
1 parent d474be6 commit c0df1f4
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lhotse/recipes/icmcasr.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@
from lhotse.supervision import SupervisionSegment, SupervisionSet
from lhotse.utils import Pathlike, is_module_available

ICMCASR = ("train", "dev") # TODO: Support all subsets when released
ICMCASR = (
"train",
"dev",
"eval_track1",
) # TODO: Support eval2 by people who have access to it.
POSITION = ("DA01", "DA02", "DA03", "DA04")
# ignore "DX05C01", "DX06C01",
# which are 2-channel reference signals for AEC.
Expand Down Expand Up @@ -124,7 +128,7 @@ def _parse_utterance(
end = interval.maxTime
text = interval.mark
segment = SupervisionSegment(
id=f"{recording_id}-{i}",
id=f"{recording_id}-{round(start * 1000):06}-{round(end * 1000):06}",
recording_id=recording_id,
start=start,
duration=round(end - start, 4),
Expand Down Expand Up @@ -199,6 +203,8 @@ def prepare_icmcasr(
logging.info("Preparing ICMC-ASR...")

subsets = ICMCASR
if mic == "ihm":
subsets = ("train", "dev")

if output_dir is not None:
output_dir = Path(output_dir)
Expand Down

0 comments on commit c0df1f4

Please sign in to comment.