update README
Browse files
README.md
CHANGED
|
@@ -77,8 +77,6 @@ The model can be evaluated as follows on the Chinese (Hong Kong) test data of Co
|
|
| 77 |
|
| 78 |
|
| 79 |
```python
|
| 80 |
-
!mkdir cer
|
| 81 |
-
!wget -O cer/cer.py https://huggingface.co/ctl/wav2vec2-large-xlsr-cantonese/raw/main/cer.py
|
| 82 |
!pip install jiwer
|
| 83 |
import torch
|
| 84 |
import torchaudio
|
|
@@ -93,7 +91,7 @@ model_id = "ctl/wav2vec2-large-xlsr-cantonese"
|
|
| 93 |
chars_to_ignore_regex = '[\,\?\.\!\-\;\:"\“\%\‘\”\�\.\⋯\!\-\:\–\。\》\,\)\,\?\;\~\~\…\︰\,\(\」\‧\《\﹔\、\—\/\,\「\﹖\·\']'
|
| 94 |
|
| 95 |
test_dataset = load_dataset("common_voice", f"{lang_id}", split="test")
|
| 96 |
-
cer = load_metric("
|
| 97 |
|
| 98 |
processor = Wav2Vec2Processor.from_pretrained(f"{model_id}")
|
| 99 |
model = Wav2Vec2ForCTC.from_pretrained(f"{model_id}")
|
|
|
|
| 77 |
|
| 78 |
|
| 79 |
```python
|
|
|
|
|
|
|
| 80 |
!pip install jiwer
|
| 81 |
import torch
|
| 82 |
import torchaudio
|
|
|
|
| 91 |
chars_to_ignore_regex = '[\,\?\.\!\-\;\:"\“\%\‘\”\�\.\⋯\!\-\:\–\。\》\,\)\,\?\;\~\~\…\︰\,\(\」\‧\《\﹔\、\—\/\,\「\﹖\·\']'
|
| 92 |
|
| 93 |
test_dataset = load_dataset("common_voice", f"{lang_id}", split="test")
|
| 94 |
+
cer = load_metric("cer")
|
| 95 |
|
| 96 |
processor = Wav2Vec2Processor.from_pretrained(f"{model_id}")
|
| 97 |
model = Wav2Vec2ForCTC.from_pretrained(f"{model_id}")
|