Downloads · 30 days
65
13% of all-time downloads
Cosmobillian/turkish_whisper_for_noisy_datas_v1
turkish_whisper_for_noisy_datas_v1 is a automatic speech recognition model from Cosmobillian. Use it when you need speech turned into text.
A Whisper-large-v3 model fine-tuned for noisy Turkish speech recognition (short utterances, real-world environments).
Downloads · 30 days
65
13% of all-time downloads
All-time downloads
489
Public
Parameters
1.5B
6.2 GB on disk
Likes
2
Public
Click a slice to open those files.
.safetensors6.2 GB · 100%
From the Hugging Face model README
A Whisper-large-v3 model fine-tuned for noisy Turkish speech recognition (short utterances, real-world environments).
openai/whisper-large-v3tr)This model is designed to perform robust speech-to-text for noisy Turkish audio, especially:
It is not a general multilingual model any more; the decoding is heavily biased towards Turkish.
Primary use-case:
Good for:
Not ideal for:
Note: This is a custom fine-tuned model; base capabilities come from
openai/whisper-large-v3.
openai/whisper-large-v3Exact dataset is not public; this model should be treated as research / experimental.
The model has been manually checked on several noisy Turkish utterances. Qualitatively:
There is no official WER benchmark on a public dataset yet (e.g. Common Voice, MLS).
If you use this model in a paper or product, please:
pipeline)!pip install -q transformers soundfile librosa
import torch
import librosa
from transformers import WhisperProcessor, WhisperForConditionalGeneration
MODEL_ID = "Cosmobillian/turkish_whisper_for_noisy_datas"
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
processor = WhisperProcessor.from_pretrained(MODEL_ID)
model = WhisperForConditionalGeneration.from_pretrained(MODEL_ID).to(device)
# Dil/task prompt'unu zorla (TR + transcribe)
forced_ids = processor.get_decoder_prompt_ids(
language="turkish",
task="transcribe",
)
model.config.forced_decoder_ids = forced_ids
if hasattr(model, "generation_config"):
model.generation_config.forced_decoder_ids = forced_ids
def load_audio(path, target_sr=16000):
audio, sr = librosa.load(path, sr=None, mono=True)
if sr != target_sr:
audio = librosa.resample(audio, orig_sr=sr, target_sr=target_sr)
sr = target_sr
return audio, sr
def chunked_transcribe(path, chunk_sec=30.0, stride_sec=5.0, max_new_tokens=256):
speech, sr = load_audio(path, 16000)
chunk_size = int(chunk_sec * sr)
stride_size = int(stride_sec * sr)
texts = []
start = 0
while start < len(speech):
end = start + chunk_size
chunk = speech[start:end]
if len(chunk) == 0:
break
inputs = processor(
chunk,
sampling_rate=sr,
return_tensors="pt",
)
input_features = inputs.input_features.to(device)
with torch.no_grad():
generated_ids = model.generate(
input_features,
max_new_tokens=max_new_tokens,
do_sample=False,
num_beams=1,
no_repeat_ngram_size=3,
repetition_penalty=1.2,
)
text = processor.batch_decode(
generated_ids,
skip_special_tokens=True
)[0]
texts.append(text)
# bir sonraki chunk'a stride kadar kayarak git
start = end - stride_size
return " ".join(texts)
# ÖRNEK KULLANIM
AUDIO_PATH = "/content/uzun_kayit.wav"
full_text = chunked_transcribe(AUDIO_PATH, chunk_sec=30, stride_sec=5, max_new_tokens=256)
print("Tam transkripsiyon:\n")
print(full_text)