mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-27 02:34:21 +00:00
init commit
This commit is contained in:
parent
5df24c1685
commit
af62891812
@ -1 +0,0 @@
|
|||||||
../../../librispeech/ASR/local/compile_hlg.py
|
|
@ -1 +0,0 @@
|
|||||||
../../../librispeech/ASR/local/compile_lg.py
|
|
@ -52,6 +52,15 @@ def normalize_text(utt: str, language: str) -> str:
|
|||||||
return re.sub(r"[^A-ZÀÂÆÇÉÈÊËÎÏÔŒÙÛÜ' ]", "", utt).upper()
|
return re.sub(r"[^A-ZÀÂÆÇÉÈÊËÎÏÔŒÙÛÜ' ]", "", utt).upper()
|
||||||
elif language == "pl":
|
elif language == "pl":
|
||||||
return re.sub(r"[^a-ząćęłńóśźżA-ZĄĆĘŁŃÓŚŹŻ' ]", "", utt).upper()
|
return re.sub(r"[^a-ząćęłńóśźżA-ZĄĆĘŁŃÓŚŹŻ' ]", "", utt).upper()
|
||||||
|
elif language == "yue":
|
||||||
|
return (
|
||||||
|
utt.replace(" ", "")
|
||||||
|
.replace(",", "")
|
||||||
|
.replace("。", " ")
|
||||||
|
.replace("?", "")
|
||||||
|
.replace("!", "")
|
||||||
|
.replace("?", "")
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
raise NotImplementedError(
|
raise NotImplementedError(
|
||||||
f"""
|
f"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user