Automatic Speech Recognition
Transformers
Safetensors
Northern Kurdish
wav2vec2-bert
kurdish
badini
kurmanji
low-resource
Instructions to use computeram/badini-w2v-bert with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use computeram/badini-w2v-bert with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="computeram/badini-w2v-bert")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForCTC processor = AutoProcessor.from_pretrained("computeram/badini-w2v-bert") model = AutoModelForCTC.from_pretrained("computeram/badini-w2v-bert", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from computeram/badini-w2v-bert: direct link, hf CLI and curl.
- Browser
- Download file 1.79 kB
-
https://huggingface.co/computeram/badini-w2v-bert/resolve/main/README.md
- Command line
-
hf download hf://computeram/badini-w2v-bert/README.md
-
curl -L -o README.md https://huggingface.co/computeram/badini-w2v-bert/resolve/main/README.md
1.79 kB
| language: | |
| - kmr | |
| license: mit | |
| library_name: transformers | |
| tags: | |
| - automatic-speech-recognition | |
| - wav2vec2-bert | |
| - kurdish | |
| - badini | |
| - kurmanji | |
| - low-resource | |
| base_model: facebook/w2v-bert-2.0 | |
| pipeline_tag: automatic-speech-recognition | |
| # Badini Kurdish ASR (Wav2Vec2-BERT) | |
| An automatic speech recognition (ASR) model for **Badini Kurdish** (a variety of | |
| Kurmanji, written in Arabic script), fine-tuned from | |
| [`facebook/w2v-bert-2.0`](https://huggingface.co/facebook/w2v-bert-2.0) | |
| with a CTC head. | |
| ## Input requirements | |
| - Audio must be **16 kHz, mono**. | |
| - Resample any other sample rate to 16 kHz before running inference. | |
| ## Usage | |
| ```python | |
| import torch, soundfile as sf | |
| from transformers import Wav2Vec2BertForCTC, Wav2Vec2BertProcessor | |
| repo_id = "computeram/badini-w2v-bert" | |
| processor = Wav2Vec2BertProcessor.from_pretrained(repo_id) | |
| model = Wav2Vec2BertForCTC.from_pretrained(repo_id).eval() | |
| speech, sr = sf.read("audio.wav") # 16 kHz mono | |
| inputs = processor(speech, sampling_rate=16000, return_tensors="pt") | |
| with torch.no_grad(): | |
| logits = model(**inputs).logits | |
| pred_ids = torch.argmax(logits, dim=-1) | |
| print(processor.batch_decode(pred_ids)[0]) | |
| ``` | |
| ## Important: text normalization | |
| This repository contains **only the acoustic model**. The raw output is plain CTC | |
| decoding. A separate normalization pipeline — punctuation restoration, | |
| number-to-word expansion (with Badini-specific remapping), character | |
| normalization, and word-variant correction — is applied in the downstream | |
| application and is **not** included here. Output straight from this model will | |
| not match the fully normalized transcripts. | |
| ## Intended use | |
| Speech transcription for Badini Kurdish. Given the WER, best used with | |
| downstream normalization/post-processing rather than as raw final text. | |