patrickvonplaten commited on
Commit
75ed774
1 Parent(s): 76c4d1f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -6
README.md CHANGED
@@ -21,7 +21,7 @@ model-index:
21
  metrics:
22
  - name: Test WER
23
  type: wer
24
- value: 30.92
25
  ---
26
 
27
  # Greek (el) version of the XLSR-Wav2Vec2 automatic speech recognition (ASR) model
@@ -63,7 +63,7 @@ import numpy as np
63
  from datasets import load_dataset, load_metric
64
  import torch
65
 
66
- chars_to_ignore_regex = '[\\,\\?\\.\\!\\-\\;\\:\\"\\“\\%\\‘\\”\\�]'
67
 
68
  def remove_special_characters(batch):
69
  batch["text"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower() + " "
@@ -134,7 +134,7 @@ print("Prediction:")
134
  print(processor.decode(pred_ids[0]))
135
  # πού θέλεις να πάμε ρώτησε φοβισμένα ο βασιλιάς
136
 
137
- print("\
138
  Reference:")
139
  print(common_voice_test_transcription["sentence"][example].lower())
140
  # πού θέλεις να πάμε; ρώτησε φοβισμένα ο βασιλιάς.
@@ -160,7 +160,7 @@ processor = Wav2Vec2Processor.from_pretrained("lighteternal/wav2vec2-large-xlsr-
160
  model = Wav2Vec2ForCTC.from_pretrained("lighteternal/wav2vec2-large-xlsr-53-greek")
161
  model.to("cuda")
162
 
163
- chars_to_ignore_regex = '[\\,\\?\\.\\!\\-\\;\\:\\"\\“\\%\\‘\\”\\�]'
164
  resampler = torchaudio.transforms.Resample(48_000, 16_000)
165
 
166
  # Preprocessing the datasets.
@@ -189,7 +189,7 @@ result = test_dataset.map(evaluate, batched=True, batch_size=8)
189
  print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_strings"], references=result["sentence"])))
190
  ```
191
 
192
- **Test Result**: 30.92 %
193
 
194
  ### How to use for training:
195
 
@@ -202,7 +202,7 @@ Instructions and code to replicate the process are provided in the Fine_Tune_XLS
202
  | ----------- | ----------- |
203
  | Training Loss | 0.0287 |
204
  | Validation Loss | 0.6062 |
205
- | WER on CommonVoice Test *| 0.3092 |
206
  * Reference transcripts were lower-cased and striped of punctuation and special characters.
207
 
208
  Full metrics log here:
 
21
  metrics:
22
  - name: Test WER
23
  type: wer
24
+ value: 31.05
25
  ---
26
 
27
  # Greek (el) version of the XLSR-Wav2Vec2 automatic speech recognition (ASR) model
 
63
  from datasets import load_dataset, load_metric
64
  import torch
65
 
66
+ chars_to_ignore_regex = '[\\\\,\\\\?\\\\.\\\\!\\\\-\\\\;\\\\:\\\\"\\\\“\\\\%\\\\‘\\\\”\\\\�]'
67
 
68
  def remove_special_characters(batch):
69
  batch["text"] = re.sub(chars_to_ignore_regex, '', batch["sentence"]).lower() + " "
 
134
  print(processor.decode(pred_ids[0]))
135
  # πού θέλεις να πάμε ρώτησε φοβισμένα ο βασιλιάς
136
 
137
+ print("\\
138
  Reference:")
139
  print(common_voice_test_transcription["sentence"][example].lower())
140
  # πού θέλεις να πάμε; ρώτησε φοβισμένα ο βασιλιάς.
 
160
  model = Wav2Vec2ForCTC.from_pretrained("lighteternal/wav2vec2-large-xlsr-53-greek")
161
  model.to("cuda")
162
 
163
+ chars_to_ignore_regex = '[\\\\,\\\\?\\\\.\\\\!\\\\-\\\\;\\\\:\\\\"\\\\“\\\\%\\\\‘\\\\”\\\\�]'
164
  resampler = torchaudio.transforms.Resample(48_000, 16_000)
165
 
166
  # Preprocessing the datasets.
 
189
  print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_strings"], references=result["sentence"])))
190
  ```
191
 
192
+ **Test Result**: 31.05 %
193
 
194
  ### How to use for training:
195
 
 
202
  | ----------- | ----------- |
203
  | Training Loss | 0.0287 |
204
  | Validation Loss | 0.6062 |
205
+ | WER on CommonVoice Test *| 0.3105 |
206
  * Reference transcripts were lower-cased and striped of punctuation and special characters.
207
 
208
  Full metrics log here: