Update README.md
Browse files
README.md
CHANGED
|
@@ -9,197 +9,76 @@ metrics:
|
|
| 9 |
- wer
|
| 10 |
---
|
| 11 |
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
|
| 14 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
| 15 |
|
| 16 |
|
|
|
|
| 17 |
|
| 18 |
-
|
|
|
|
| 19 |
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
-
|
| 23 |
|
| 24 |
-
|
|
|
|
|
|
|
| 25 |
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
- **Shared by [optional]:** [More Information Needed]
|
| 29 |
-
- **Model type:** [More Information Needed]
|
| 30 |
-
- **Language(s) (NLP):** [More Information Needed]
|
| 31 |
-
- **License:** [More Information Needed]
|
| 32 |
-
- **Finetuned from model [optional]:** [More Information Needed]
|
| 33 |
|
| 34 |
-
|
|
|
|
| 35 |
|
| 36 |
-
|
|
|
|
| 37 |
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
- **Demo [optional]:** [More Information Needed]
|
| 41 |
|
| 42 |
-
|
|
|
|
| 43 |
|
| 44 |
-
|
| 45 |
|
| 46 |
-
|
|
|
|
|
|
|
| 47 |
|
| 48 |
-
|
| 49 |
|
| 50 |
-
|
|
|
|
|
|
|
| 51 |
|
| 52 |
-
|
| 53 |
|
| 54 |
-
|
| 55 |
|
| 56 |
-
[More Information Needed]
|
| 57 |
|
| 58 |
-
### Out-of-Scope Use
|
| 59 |
|
| 60 |
-
|
| 61 |
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
### Recommendations
|
| 71 |
-
|
| 72 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
| 73 |
-
|
| 74 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
| 75 |
-
|
| 76 |
-
## How to Get Started with the Model
|
| 77 |
-
|
| 78 |
-
Use the code below to get started with the model.
|
| 79 |
-
|
| 80 |
-
[More Information Needed]
|
| 81 |
-
|
| 82 |
-
## Training Details
|
| 83 |
-
|
| 84 |
-
### Training Data
|
| 85 |
-
|
| 86 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
| 87 |
-
|
| 88 |
-
[More Information Needed]
|
| 89 |
-
|
| 90 |
-
### Training Procedure
|
| 91 |
-
|
| 92 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
| 93 |
-
|
| 94 |
-
#### Preprocessing [optional]
|
| 95 |
-
|
| 96 |
-
[More Information Needed]
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
#### Training Hyperparameters
|
| 100 |
-
|
| 101 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
| 102 |
-
|
| 103 |
-
#### Speeds, Sizes, Times [optional]
|
| 104 |
-
|
| 105 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
| 106 |
-
|
| 107 |
-
[More Information Needed]
|
| 108 |
-
|
| 109 |
-
## Evaluation
|
| 110 |
-
|
| 111 |
-
<!-- This section describes the evaluation protocols and provides the results. -->
|
| 112 |
-
|
| 113 |
-
### Testing Data, Factors & Metrics
|
| 114 |
-
|
| 115 |
-
#### Testing Data
|
| 116 |
-
|
| 117 |
-
<!-- This should link to a Dataset Card if possible. -->
|
| 118 |
-
|
| 119 |
-
[More Information Needed]
|
| 120 |
-
|
| 121 |
-
#### Factors
|
| 122 |
-
|
| 123 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
| 124 |
-
|
| 125 |
-
[More Information Needed]
|
| 126 |
-
|
| 127 |
-
#### Metrics
|
| 128 |
-
|
| 129 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
| 130 |
-
|
| 131 |
-
[More Information Needed]
|
| 132 |
-
|
| 133 |
-
### Results
|
| 134 |
-
|
| 135 |
-
[More Information Needed]
|
| 136 |
-
|
| 137 |
-
#### Summary
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
## Model Examination [optional]
|
| 142 |
-
|
| 143 |
-
<!-- Relevant interpretability work for the model goes here -->
|
| 144 |
-
|
| 145 |
-
[More Information Needed]
|
| 146 |
-
|
| 147 |
-
## Environmental Impact
|
| 148 |
-
|
| 149 |
-
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
| 150 |
-
|
| 151 |
-
Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
|
| 152 |
-
|
| 153 |
-
- **Hardware Type:** [More Information Needed]
|
| 154 |
-
- **Hours used:** [More Information Needed]
|
| 155 |
-
- **Cloud Provider:** [More Information Needed]
|
| 156 |
-
- **Compute Region:** [More Information Needed]
|
| 157 |
-
- **Carbon Emitted:** [More Information Needed]
|
| 158 |
-
|
| 159 |
-
## Technical Specifications [optional]
|
| 160 |
-
|
| 161 |
-
### Model Architecture and Objective
|
| 162 |
-
|
| 163 |
-
[More Information Needed]
|
| 164 |
-
|
| 165 |
-
### Compute Infrastructure
|
| 166 |
-
|
| 167 |
-
[More Information Needed]
|
| 168 |
-
|
| 169 |
-
#### Hardware
|
| 170 |
-
|
| 171 |
-
[More Information Needed]
|
| 172 |
-
|
| 173 |
-
#### Software
|
| 174 |
-
|
| 175 |
-
[More Information Needed]
|
| 176 |
-
|
| 177 |
-
## Citation [optional]
|
| 178 |
-
|
| 179 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
| 180 |
-
|
| 181 |
-
**BibTeX:**
|
| 182 |
-
|
| 183 |
-
[More Information Needed]
|
| 184 |
-
|
| 185 |
-
**APA:**
|
| 186 |
-
|
| 187 |
-
[More Information Needed]
|
| 188 |
-
|
| 189 |
-
## Glossary [optional]
|
| 190 |
-
|
| 191 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
| 192 |
-
|
| 193 |
-
[More Information Needed]
|
| 194 |
-
|
| 195 |
-
## More Information [optional]
|
| 196 |
-
|
| 197 |
-
[More Information Needed]
|
| 198 |
-
|
| 199 |
-
## Model Card Authors [optional]
|
| 200 |
-
|
| 201 |
-
[More Information Needed]
|
| 202 |
-
|
| 203 |
-
## Model Card Contact
|
| 204 |
-
|
| 205 |
-
[More Information Needed]
|
|
|
|
| 9 |
- wer
|
| 10 |
---
|
| 11 |
|
| 12 |
+
<div align="center" style="line-height: 1;">
|
| 13 |
+
<h1>Automatic Speech Recognition for Tigrinya </h1>
|
| 14 |
+
<a href="https://huggingface.co/datasets/badrex/ethiopian-speech-flat" target="_blank" style="margin: 2px;">
|
| 15 |
+
<img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Dataset-ffc107?color=ffca28&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
| 16 |
+
<a href="https://huggingface.co/spaces/badrex/Ethiopia-ASR" target="_blank" style="margin: 2px;">
|
| 17 |
+
<img alt="Hugging Face" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Space-ffc107?color=c62828&logoColor=white" style="display: inline-block; vertical-align: middle;"/>
|
| 18 |
+
<a href="https://creativecommons.org/licenses/by/4.0/deed.en" style="margin: 2px;">
|
| 19 |
+
<img alt="License" src="https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg" style="display: inline-block; vertical-align: middle;"/>
|
| 20 |
+
</a>
|
| 21 |
+
</div>
|
| 22 |
|
|
|
|
| 23 |
|
| 24 |
|
| 25 |
+
## 🍇 Model Description
|
| 26 |
|
| 27 |
+
This is a Automatic Speech Recognition (ASR) model for Tigrinya, an Afroasiatic language that is primarily spoken by the Tigrinya and Tigrayan peoples, native to Eritrea and to the Tigray Region of Ethiopia.
|
| 28 |
+
It is fine‑tuned from Wav2Vec2‑BERT 2.0 using the [Ethio speech corpus](https://huggingface.co/datasets/badrex/ethiopian-speech-flat).
|
| 29 |
|
| 30 |
+
- **Developed by:** Badr al-Absi
|
| 31 |
+
- **Model type:** Speech Recognition (ASR)
|
| 32 |
+
- **Languages:** Tigrinya
|
| 33 |
+
- **License:** CC-BY-4.0
|
| 34 |
+
- **Finetuned from:** facebook/w2v-bert-2.0
|
| 35 |
|
| 36 |
+
## 🎧 Direct Use
|
| 37 |
|
| 38 |
+
``` python
|
| 39 |
+
from transformers import Wav2Vec2BertProcessor, Wav2Vec2BertForCTC
|
| 40 |
+
import torchaudio, torch
|
| 41 |
|
| 42 |
+
processor = Wav2Vec2BertProcessor.from_pretrained("badrex/w2v-bert-2.0-tigrinya-asr")
|
| 43 |
+
model = Wav2Vec2BertForCTC.from_pretrained("badrex/w2v-bert-2.0-tigrinya-asr")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
|
| 45 |
+
audio, sr = torchaudio.load("audio.wav")
|
| 46 |
+
inputs = processor(audio.squeeze(), sampling_rate=sr, return_tensors="pt")
|
| 47 |
|
| 48 |
+
with torch.no_grad():
|
| 49 |
+
logits = model(**inputs).logits
|
| 50 |
|
| 51 |
+
pred_ids = torch.argmax(logits, dim=-1)
|
| 52 |
+
transcription = processor.batch_decode(pred_ids)[0]
|
|
|
|
| 53 |
|
| 54 |
+
print(transcription)
|
| 55 |
+
```
|
| 56 |
|
| 57 |
+
## 🔧 Downstream Use
|
| 58 |
|
| 59 |
+
- Voice assistants
|
| 60 |
+
- Accessibility tools
|
| 61 |
+
- Research baselines
|
| 62 |
|
| 63 |
+
## 🚫 Out‑of‑Scope Use
|
| 64 |
|
| 65 |
+
- Other languages besides Tigrinya
|
| 66 |
+
- High‑stakes deployments without human review
|
| 67 |
+
- Noisy audio without further tuning
|
| 68 |
|
| 69 |
+
## ⚠️ Risks & Limitations
|
| 70 |
|
| 71 |
+
Performance varies with accents, dialects, and recording quality.
|
| 72 |
|
|
|
|
| 73 |
|
|
|
|
| 74 |
|
| 75 |
+
## 📌 Citation
|
| 76 |
|
| 77 |
+
``` bibtex
|
| 78 |
+
@misc{w2v_bert_ethiopian_asr,
|
| 79 |
+
author = {Badr M. Abdullah},
|
| 80 |
+
title = {Fine-tuning Wav2Vec2-BERT 2.0 for Ethiopian ASR},
|
| 81 |
+
year = {2025},
|
| 82 |
+
url = {https://huggingface.co/badrex/w2v-bert-2.0-tigrinya-asr}
|
| 83 |
+
}
|
| 84 |
+
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|