Marxav commited on
Commit
f650755
1 Parent(s): 8f72635

Copy breton2 to breton

Browse files
Files changed (1) hide show
  1. README.md +12 -8
README.md CHANGED
@@ -21,9 +21,9 @@ model-index:
21
  metrics:
22
  - name: Test WER
23
  type: wer
24
- value: 44.34
25
  ---
26
- # Wav2Vec2-Large-XLSR-53-Breton
27
  The model can be used directly (without a language model) as follows:
28
  ```python
29
  import torch
@@ -34,8 +34,8 @@ from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
34
  lang = "br"
35
  test_dataset = load_dataset("common_voice", lang, split="test[:2%]")
36
 
37
- processor = Wav2Vec2Processor.from_pretrained("Marxav/wav2vec2-large-xlsr-53-breton")
38
- model = Wav2Vec2ForCTC.from_pretrained("Marxav/wav2vec2-large-xlsr-53-breton")
39
 
40
  resampler = torchaudio.transforms.Resample(48_000, 16_000)
41
 
@@ -66,16 +66,16 @@ print("Prediction:", processor.batch_decode(predicted_ids))
66
  print("Reference:", test_dataset["sentence"][:nb_samples])
67
  ```
68
  The above code leads to the following prediction for the first two samples:
69
- * Prediction: ["nel ler ket dont abenn eus netra la vez ser mirc'hid evel sij", 'an eil hag egile']
70
- * Reference: ["N'haller ket dont a-benn eus netra pa vezer nec'het evel-se ", 'An eil hag egile ']
71
 
72
  The model can be evaluated as follows on the {language} test data of Common Voice.
73
  ```python
 
74
  import torch
75
  import torchaudio
76
  from datasets import load_dataset, load_metric
77
  from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
78
- import re
79
 
80
  lang = 'br'
81
  test_dataset = load_dataset("common_voice", lang, split="test")
@@ -120,4 +120,8 @@ def evaluate(batch):
120
  result = test_dataset.map(evaluate, batched=True, batch_size=8)
121
 
122
  print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_strings"], references=result["sentence"])))
123
- ```
 
 
 
 
 
21
  metrics:
22
  - name: Test WER
23
  type: wer
24
+ value: 43.43
25
  ---
26
+ # wav2vec2-large-xlsr-53-breton2
27
  The model can be used directly (without a language model) as follows:
28
  ```python
29
  import torch
 
34
  lang = "br"
35
  test_dataset = load_dataset("common_voice", lang, split="test[:2%]")
36
 
37
+ processor = Wav2Vec2Processor.from_pretrained("Marxav/wav2vec2-large-xlsr-53-breton2")
38
+ model = Wav2Vec2ForCTC.from_pretrained("Marxav/wav2vec2-large-xlsr-53-breton2")
39
 
40
  resampler = torchaudio.transforms.Resample(48_000, 16_000)
41
 
 
66
  print("Reference:", test_dataset["sentence"][:nb_samples])
67
  ```
68
  The above code leads to the following prediction for the first two samples:
69
+ * Prediction: ["neller ket dont a-benn eus netra la vez ser merc'hed evel sich", 'an eil hag egile']
70
+ * Reference: ["N'haller ket dont a-benn eus netra pa vezer nec'het evel-se.", 'An eil hag egile.']
71
 
72
  The model can be evaluated as follows on the {language} test data of Common Voice.
73
  ```python
74
+ import re
75
  import torch
76
  import torchaudio
77
  from datasets import load_dataset, load_metric
78
  from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
 
79
 
80
  lang = 'br'
81
  test_dataset = load_dataset("common_voice", lang, split="test")
 
120
  result = test_dataset.map(evaluate, batched=True, batch_size=8)
121
 
122
  print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_strings"], references=result["sentence"])))
123
+ ```
124
+
125
+ **Test Result**: 43.43%
126
+ ## Training
127
+ The Common Voice `train`, `validation` datasets were used for training.