Downloads · 30 days
39
56% of all-time downloads
Pirnazar/whisper-large-v3-turbo-turkmen-lora
whisper-large-v3-turbo-turkmen-lora is a automatic speech recognition model from Pirnazar. Use it when you need speech turned into text. It is set up for peft. The card lists the license as cc-by-nc-4.0.
Turkmen speech recognition fine-tune shared by Pirnazar. This repository contains the trained LoRA adapter (about 6.6 MB), plus the processor and tokenizer. The base model is downloaded separately on first use.
Downloads · 30 days
39
56% of all-time downloads
All-time downloads
70
Public
Repo size
6.6 MB
Likes
0
Public
Click a slice to open those files.
.safetensors6.6 MB · 63%
From the Hugging Face model README
Turkmen speech recognition fine-tune shared by Pirnazar. This repository contains the trained LoRA adapter (about 6.6 MB), plus the processor and tokenizer. The base model is downloaded separately on first use.
pip install "transformers==5.17.0" "peft==0.21.0" torch soundfile scipy
import math
import torch
import soundfile as sf
from scipy.signal import resample_poly
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
from peft import PeftModel
repo = "Pirnazar/whisper-large-v3-turbo-turkmen-lora"
device = "cuda" if torch.cuda.is_available() else "cpu"
dtype = torch.float16 if device == "cuda" else torch.float32
processor = AutoProcessor.from_pretrained(repo)
base = AutoModelForSpeechSeq2Seq.from_pretrained(
"openai/whisper-large-v3-turbo", dtype=dtype,
)
model = PeftModel.from_pretrained(base, repo).merge_and_unload().to(device).eval()
audio, sr = sf.read("audio.wav", dtype="float32")
if audio.ndim == 2:
audio = audio.mean(axis=1)
if sr != 16000:
divisor = math.gcd(sr, 16000)
audio = resample_poly(audio, 16000 // divisor, sr // divisor)
if len(audio) > 30 * 16000:
raise ValueError("Split recordings into clips of at most 30 seconds for this example.")
inputs = processor(audio, sampling_rate=16000, return_tensors="pt", return_attention_mask=True)
model.generation_config.forced_decoder_ids = None
with torch.inference_mode():
ids = model.generate(
inputs.input_features.to(device=device, dtype=dtype),
attention_mask=inputs.attention_mask.to(device),
language="tk", task="transcribe", return_timestamps=False,
)
print(processor.batch_decode(ids, skip_special_tokens=True)[0])
q_proj and v_proj.These are validation metrics, not an independent test-set benchmark. Performance on noisy, mixed-language or out-of-domain audio is not established. Review important transcripts for errors and hallucinations. Training did not use timestamp tokens: use Turkmen transcription with timestamp generation disabled.
This fine-tuned release is distributed for non-commercial use under
CC BY-NC 4.0.
Training data is published by mamed0v under CC BY-NC 4.0. The base OpenAI Whisper
model is MIT-licensed; see LICENSE-WHISPER. Credit OpenAI,
mamed0v/TurkmenSpeech and Pirnazar when redistributing, and indicate modifications.
This is a community fine-tune, not an official OpenAI release.