Metrics below come from the
same validation split used during fine-tuning (auto-generated Trainer card). They are
not a fresh benchmark on
HyVoxPopuli or Common Voice test sets.
For stronger Armenian ASR today, prefer
facebook/mms-1b-all with the
hy language adapter (see HyVoxPopuli dataset card).
1import torch
2from datasets import load_dataset, Audio
3from transformers import WhisperForConditionalGeneration, WhisperProcessor
4
5model_id = "Edmon02/whisper-small-hy"
6device = "cuda" if torch.cuda.is_available() else "cpu"
7
8processor = WhisperProcessor.from_pretrained(model_id)
9model = WhisperForConditionalGeneration.from_pretrained(model_id).to(device)
10model.config.forced_decoder_ids = processor.get_decoder_prompt_ids(
11 language="hy", task="transcribe"
12)
13
14# Example: HyVoxPopuli test clip (filter empty text in real eval)
15ds = load_dataset("Edmon02/hyvoxpopuli", split="test")
16ds = ds.cast_column("audio", Audio(sampling_rate=16_000))
17ds = ds.filter(lambda x: bool((x["normalized_text"] or "").strip()))
18sample = ds[0]
19
20inputs = processor(
21 sample["audio"]["array"],
22 sampling_rate=16_000,
23 return_tensors="pt",
24)
25inputs = {k: v.to(device) for k, v in inputs.items()}
26
27with torch.no_grad():
28 ids = model.generate(**inputs, max_new_tokens=256)
29
30hypothesis = processor.batch_decode(ids, skip_special_tokens=True)[0]
31print("Hypothesis:", hypothesis)
32print("Reference:", sample["normalized_text"])
1from transformers import pipeline
2
3asr = pipeline(
4 "automatic-speech-recognition",
5 model="Edmon02/whisper-small-hy",
6 device=0,
7 generate_kwargs={"language": "hy", "task": "transcribe"},
8)
9# asr(audio_path_or_array)
Training data is not serialized in this repo; it was likely
Common Voice hy-AM (and/or project-internal splits) from the same era as
speecht5_finetuned_hy. Re-run training with documented splits before trusting metrics.
ASR errors disproportionately affect dialectal or code-switched Armenian (e.g. Russian lines in literary sources). Do not use outputs for high-stakes decisions without human review.
1@misc{whisper_small_hy2024,
2 author = {Avetisyan, Edmon},
3 title = {Armenian Whisper Small (whisper-small-hy)},
4 year = {2024},
5 publisher = {Hugging Face},
6 howpublished = {\url{https://huggingface.co/Edmon02/whisper-small-hy}}
7}
Also cite
OpenAI Whisper and your training data (e.g. Common Voice, HyVoxPopuli).
Apache-2.0 (inherits from Whisper fine-tuning convention). Base
openai/whisper-small license applies to architecture and tokenizer.