Skip to content

Commit

Permalink
Update preprocess_commonvoice.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZr committed Mar 13, 2024
1 parent b30a4d6 commit eaceb69
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion egs/commonvoice/ASR/local/preprocess_commonvoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from pathlib import Path
from typing import Optional

from lhotse import CutSet, SupervisionSegment
from lhotse import CutSet
from lhotse.recipes.utils import read_manifests_if_cached


Expand Down Expand Up @@ -82,6 +82,17 @@ def normalize_text(utt: str, language: str) -> str:
.replace("…", "")
.replace("⋯", "")
.replace("·", "")
.replace("﹒", "")
.replace(".", "")
.replace(":", "")
.replace("︰", "")
.replace("﹖", "")
.replace("(", "")
.replace(")", "")
.replace("-", "")
.replace("~", "")
.replace(";", "")
.replace("", "")
.upper()
)
else:
Expand Down

0 comments on commit eaceb69

Please sign in to comment.