Download runtime/train.py from Hansda/tiny-dictation-en: direct link, hf CLI and curl.
- Browser
- Download file 273 Bytes
-
https://huggingface.co/Hansda/tiny-dictation-en/resolve/main/runtime/train.py
- Command line
-
hf download hf://Hansda/tiny-dictation-en/runtime/train.py
-
curl -L -o train.py https://huggingface.co/Hansda/tiny-dictation-en/resolve/main/runtime/train.py
273 Bytes
| 'Fine-tune the tiny acoustic model on English dictation recordings.' | |
| import re | |
| REPLACEMENTS = str.maketrans({"’": "'", "‘": "'", "ʼ": "'", "é": "e"}) | |
| def normalize(text): | |
| return " ".join(re.sub(r"[^a-z' ]", " ", text.lower().translate(REPLACEMENTS)).split()) | |