Automatic Speech Recognition
Transformers
Safetensors
Hindi
whisper
speech-recognition
hindi
hinglish
Instructions to use MmeOG/MME_STT_Model with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use MmeOG/MME_STT_Model with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="MmeOG/MME_STT_Model")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("MmeOG/MME_STT_Model") model = AutoModelForSpeechSeq2Seq.from_pretrained("MmeOG/MME_STT_Model", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Update model card
Browse files
README.md
CHANGED
|
@@ -13,8 +13,8 @@ tags:
|
|
| 13 |
|
| 14 |
# MME_STT_Model
|
| 15 |
|
| 16 |
-
|
| 17 |
-
|
| 18 |
|
| 19 |
## Usage
|
| 20 |
|
|
@@ -25,23 +25,18 @@ from transformers import WhisperForConditionalGeneration, WhisperProcessor
|
|
| 25 |
model = WhisperForConditionalGeneration.from_pretrained("MmeOG/MME_STT_Model", torch_dtype=torch.float16).to("cuda")
|
| 26 |
processor = WhisperProcessor.from_pretrained("MmeOG/MME_STT_Model")
|
| 27 |
|
| 28 |
-
audio, _ = librosa.load("sample.wav", sr=16000)
|
| 29 |
feats = processor(audio, sampling_rate=16000, return_tensors="pt").input_features.to("cuda", torch.float16)
|
| 30 |
ids = model.generate(feats, language="hi", task="transcribe")
|
| 31 |
print(processor.batch_decode(ids, skip_special_tokens=True)[0])
|
| 32 |
```
|
| 33 |
|
| 34 |
-
## Training
|
| 35 |
-
|
| 36 |
-
LoRA fine-tune on about 190k utterances: IndicVoices (about 92%), MUCS and UJS (about 4% each).
|
| 37 |
-
Two epochs, batch size 16, learning rate 3e-5 (cosine), one A100 80GB.
|
| 38 |
-
|
| 39 |
## Evaluation
|
| 40 |
|
| 41 |
-
Phonetic WER (pWER, lower is better) on
|
| 42 |
-
|
| 43 |
|
| 44 |
-
| Dataset | This model | Before fine-tuning
|
| 45 |
|---|---|---|
|
| 46 |
| fleurs | 18.45 | 20.15 |
|
| 47 |
| commonvoice | 26.42 | 29.16 |
|
|
@@ -51,13 +46,11 @@ Phonetic WER (pWER, lower is better) on the public set `RinggAI/ASR-Benchmarking
|
|
| 51 |
| mucs | 19.65 | 20.84 |
|
| 52 |
| **all** | **19.64** | **21.21** |
|
| 53 |
|
| 54 |
-
pWER is a lenient metric that compares text in a shared phonetic form, so it ranks systems on the
|
| 55 |
-
same clips but should not be read as an absolute accuracy figure.
|
| 56 |
-
|
| 57 |
## Limitations
|
| 58 |
|
| 59 |
-
- Not
|
| 60 |
-
-
|
| 61 |
-
- Accuracy drops
|
| 62 |
-
-
|
| 63 |
-
-
|
|
|
|
|
|
| 13 |
|
| 14 |
# MME_STT_Model
|
| 15 |
|
| 16 |
+
Hindi speech to Roman-script Hinglish transcription (lowercase, no punctuation). The model was fine-tuned
|
| 17 |
+
with LoRA and the adapter was merged into the weights, so it loads as a normal Transformers model with no PEFT.
|
| 18 |
|
| 19 |
## Usage
|
| 20 |
|
|
|
|
| 25 |
model = WhisperForConditionalGeneration.from_pretrained("MmeOG/MME_STT_Model", torch_dtype=torch.float16).to("cuda")
|
| 26 |
processor = WhisperProcessor.from_pretrained("MmeOG/MME_STT_Model")
|
| 27 |
|
| 28 |
+
audio, _ = librosa.load("sample.wav", sr=16000) # 16 kHz mono, up to 30 seconds
|
| 29 |
feats = processor(audio, sampling_rate=16000, return_tensors="pt").input_features.to("cuda", torch.float16)
|
| 30 |
ids = model.generate(feats, language="hi", task="transcribe")
|
| 31 |
print(processor.batch_decode(ids, skip_special_tokens=True)[0])
|
| 32 |
```
|
| 33 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
## Evaluation
|
| 35 |
|
| 36 |
+
Phonetic WER (pWER, lower is better) on six public Hindi sets (1,100 clips). It is a lenient metric used
|
| 37 |
+
to compare systems on the same clips, not an absolute accuracy figure.
|
| 38 |
|
| 39 |
+
| Dataset | This model | Before fine-tuning |
|
| 40 |
|---|---|---|
|
| 41 |
| fleurs | 18.45 | 20.15 |
|
| 42 |
| commonvoice | 26.42 | 29.16 |
|
|
|
|
| 46 |
| mucs | 19.65 | 20.84 |
|
| 47 |
| **all** | **19.64** | **21.21** |
|
| 48 |
|
|
|
|
|
|
|
|
|
|
| 49 |
## Limitations
|
| 50 |
|
| 51 |
+
- Not validated on real phone calls.
|
| 52 |
+
- Not a streaming model; it transcribes after the speaker finishes.
|
| 53 |
+
- Accuracy drops in noise: about 5 to 7 points at 10 dB, and strong noise (0 dB) breaks it.
|
| 54 |
+
- Occasional repetition loops (about 0.5% of clips); a repetition guard at decoding time is recommended.
|
| 55 |
+
- Very short clips (under 2 seconds) have high error rates.
|
| 56 |
+
- Outputs have no punctuation or capitalisation, and there is no speaker diarisation.
|