Commit
•
2e3b22f
1
Parent(s):
bb4003f
Update README.md
Browse files
README.md
CHANGED
@@ -128,12 +128,12 @@ def map_to_pred(batch):
|
|
128 |
attention_mask = features.attention_mask.to("cuda")
|
129 |
|
130 |
gen_tokens = model.generate(input_features=input_features, attention_mask=attention_mask)
|
131 |
-
batch["transcription"] = processor.batch_decode(gen_tokens, skip_special_tokens=True)
|
132 |
return batch
|
133 |
|
134 |
result = librispeech_eval.map(map_to_pred, remove_columns=["audio"])
|
135 |
|
136 |
-
print("WER:", wer(predictions=result["transcription"], references=result["text"]))
|
137 |
```
|
138 |
|
139 |
*Result (WER)*:
|
|
|
128 |
attention_mask = features.attention_mask.to("cuda")
|
129 |
|
130 |
gen_tokens = model.generate(input_features=input_features, attention_mask=attention_mask)
|
131 |
+
batch["transcription"] = processor.batch_decode(gen_tokens, skip_special_tokens=True)[0]
|
132 |
return batch
|
133 |
|
134 |
result = librispeech_eval.map(map_to_pred, remove_columns=["audio"])
|
135 |
|
136 |
+
print("WER:", wer.compute(predictions=result["transcription"], references=result["text"]))
|
137 |
```
|
138 |
|
139 |
*Result (WER)*:
|