This model is a fine-tuned version of
openai/whisper-tiny on the Common Voice 17.0 dataset.
Whisper-tiny-fa is an automatic speech recognition model specifically adapted for Persian (Farsi) speech. It builds upon OpenAI’s Whisper-tiny architecture, leveraging transfer learning to specialize in transcribing Persian audio. The model is suitable for converting spoken Persian audio into text, enabling applications such as voice assistants, captioning, and speech-driven user interfaces.
Transcribing Persian (Farsi) speech to text from audio files or microphone input.
Voice-controlled applications and speech interfaces for Persian speakers.
Generating subtitles and closed captions in Persian for audio/video content.
The model is fine-tuned for Persian and may perform poorly on other languages.
Performance may degrade with low-quality or noisy audio, accents, or dialects not well represented in the training data.
Not suitable for real-time applications with strict latency constraints due to model size and processing requirements.
Dataset: Common Voice 17.0 (Persian subset)
Data split: Training, validation, and test splits provided by Common Voice were used.
Preprocessing: Audio files were resampled to 16kHz and normalized. Transcripts were cleaned and normalized to standard Persian orthography.
1import torch
2from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
3
4device = "cuda:0" if torch.cuda.is_available() else "cpu"
5torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
6
7model_id = "aictsharif/whisper-tiny-fa"
8model = AutoModelForSpeechSeq2Seq.from_pretrained(
9 model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True
10)
11model.to(device)
12
13processor = AutoProcessor.from_pretrained(model_id)
14pipe = pipeline(
15 "automatic-speech-recognition",
16 model=model,
17 tokenizer=processor.tokenizer,
18 feature_extractor=processor.feature_extractor,
19 torch_dtype=torch_dtype,
20 device=device,
21)
22
23result = pipe('sample.mp3')
24print(result["text"])