Commit
·
256685f
1
Parent(s):
d34e1f9
Recalculate metrics on the whole dataset
Browse files
README.md
CHANGED
@@ -23,7 +23,7 @@ model-index:
|
|
23 |
metrics:
|
24 |
- name: Test WER
|
25 |
type: wer
|
26 |
-
value:
|
27 |
---
|
28 |
|
29 |
# Wav2Vec2-Large-XLSR-53-Russian
|
@@ -59,7 +59,7 @@ test_dataset = test_dataset.map(speech_file_to_array_fn)
|
|
59 |
inputs = processor(test_dataset["speech"][:2], sampling_rate=16_000, return_tensors="pt", padding=True)
|
60 |
|
61 |
with torch.no_grad():
|
62 |
-
|
63 |
|
64 |
predicted_ids = torch.argmax(logits, dim=-1)
|
65 |
|
@@ -95,7 +95,7 @@ processor = Wav2Vec2Processor.from_pretrained("anton-l/wav2vec2-large-xlsr-53-ru
|
|
95 |
model = Wav2Vec2ForCTC.from_pretrained("anton-l/wav2vec2-large-xlsr-53-russian")
|
96 |
model.to("cuda")
|
97 |
|
98 |
-
cv_test = pd.read_csv("cv-corpus-6.1-2020-12-11/ru/test.tsv", sep='
|
99 |
clips_path = "cv-corpus-6.1-2020-12-11/ru/clips/"
|
100 |
|
101 |
def clean_sentence(sent):
|
@@ -135,7 +135,7 @@ del cv_test
|
|
135 |
print("WER: {:2f}".format(100 * wer.compute(predictions=preds, references=targets)))
|
136 |
```
|
137 |
|
138 |
-
**Test Result**:
|
139 |
|
140 |
|
141 |
## Training
|
|
|
23 |
metrics:
|
24 |
- name: Test WER
|
25 |
type: wer
|
26 |
+
value: 17.39
|
27 |
---
|
28 |
|
29 |
# Wav2Vec2-Large-XLSR-53-Russian
|
|
|
59 |
inputs = processor(test_dataset["speech"][:2], sampling_rate=16_000, return_tensors="pt", padding=True)
|
60 |
|
61 |
with torch.no_grad():
|
62 |
+
\\\\tlogits = model(inputs.input_values, attention_mask=inputs.attention_mask).logits
|
63 |
|
64 |
predicted_ids = torch.argmax(logits, dim=-1)
|
65 |
|
|
|
95 |
model = Wav2Vec2ForCTC.from_pretrained("anton-l/wav2vec2-large-xlsr-53-russian")
|
96 |
model.to("cuda")
|
97 |
|
98 |
+
cv_test = pd.read_csv("cv-corpus-6.1-2020-12-11/ru/test.tsv", sep='\\t')
|
99 |
clips_path = "cv-corpus-6.1-2020-12-11/ru/clips/"
|
100 |
|
101 |
def clean_sentence(sent):
|
|
|
135 |
print("WER: {:2f}".format(100 * wer.compute(predictions=preds, references=targets)))
|
136 |
```
|
137 |
|
138 |
+
**Test Result**: 17.39 %
|
139 |
|
140 |
|
141 |
## Training
|