init commit

This commit is contained in:
jinzr 2024-03-07 19:27:54 +08:00
parent 5df24c1685
commit af62891812
3 changed files with 9 additions and 2 deletions

View File

@ -1 +0,0 @@
../../../librispeech/ASR/local/compile_hlg.py

View File

@ -1 +0,0 @@
../../../librispeech/ASR/local/compile_lg.py

View File

@ -52,6 +52,15 @@ def normalize_text(utt: str, language: str) -> str:
return re.sub(r"[^A-ZÀÂÆÇÉÈÊËÎÏÔŒÙÛÜ' ]", "", utt).upper()
elif language == "pl":
return re.sub(r"[^a-ząćęłńóśźżA-ZĄĆĘŁŃÓŚŹŻ' ]", "", utt).upper()
elif language == "yue":
return (
utt.replace(" ", "")
.replace("", "")
.replace("", " ")
.replace("", "")
.replace("", "")
.replace("?", "")
)
else:
raise NotImplementedError(
f"""