Downloads · 30 days
3
5% of all-time downloads
manish320/whisper-small-jv-id-lora
whisper-small-jv-id-lora is a machine learning model from manish320. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is a fine-tuned version of OpenAI Whisper Small for automatic speech recognition (ASR) on Indonesian and Javanese speech, including code-switched utterances.
Downloads · 30 days
3
5% of all-time downloads
All-time downloads
60
Public
Parameters
242M
967 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors967 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of OpenAI Whisper Small for automatic speech recognition (ASR) on Indonesian and Javanese speech, including code-switched utterances.
openai/whisper-smallid) and Javanese (jv)This model is intended for speech-to-text transcription of Indonesian and Javanese audio.
It is particularly useful for:
The model was fine-tuned using LoRA (Low-Rank Adaptation) instead of updating all parameters of the Whisper model.
The training process was:
OpenAI Whisper Small
↓
LoRA Fine-Tuning
↓
Indonesian + Javanese Speech Data
↓
Code-Switched ASR Training
↓
LoRA Adapter
↓
Adapter Merging
↓
Final Merged Whisper Model
The final uploaded model contains the merged weights, so the LoRA adapter does not need to be loaded separately.
LoRA allows efficient fine-tuning by training only a small number of additional parameters while keeping most of the original Whisper parameters frozen.
Advantages include:
After training, the LoRA weights were merged with the original Whisper model to create a standalone model.
The model is based on the Whisper encoder-decoder architecture:
Audio
↓
Whisper Feature Extractor
↓
Whisper Encoder
↓
Whisper Decoder
↓
Text Transcription
pip install -U transformers torch librosa soundfile
import torch
from transformers import WhisperProcessor, WhisperForConditionalGeneration
model_id = "manish320/whisper-small-jv-id-lora"
processor = WhisperProcessor.from_pretrained(model_id)
model = WhisperForConditionalGeneration.from_pretrained(model_id)
device = "cuda" if torch.cuda.is_available() else "cpu"
model = model.to(device)
import librosa
import torch
audio, sampling_rate = librosa.load(
"audio.wav",
sr=16000
)
inputs = processor(
audio,
sampling_rate=16000,
return_tensors="pt"
)
input_features = inputs.input_features.to(device)
with torch.no_grad():
predicted_ids = model.generate(input_features)
transcription = processor.batch_decode(
predicted_ids,
skip_special_tokens=True
)[0]
print(transcription)
Input audio:
Saya sedang pergi ke pasar, banjur tuku panganan.
Possible transcription:
Saya sedang pergi ke pasar, banjur tuku panganan.
The model is designed to preserve the language switching present in the speech rather than forcing the complete utterance into a single language.
For multilingual and code-switching speech, language forcing can be avoided so that Whisper can generate the transcription naturally.
For example:
predicted_ids = model.generate(
input_features
)
If you specifically want to force a language, Whisper generation options can also be configured depending on the evaluation setup.
The model may have reduced performance on:
Performance may also vary depending on microphone quality, speaking style, audio duration, and domain.
Recommended ASR evaluation metrics include:
Example:
from jiwer import wer
reference = "reference transcription"
prediction = "model transcription"
score = wer(reference, prediction)
print("WER:", score)
Lower WER indicates better transcription performance.
This model is based on:
OpenAI Whisper Small
Whisper is a multilingual automatic speech recognition model trained on a large-scale collection of audio and text data.
The repository contains the merged model weights and configuration required to load the model with Hugging Face Transformers.
Typical files include:
config.json
generation_config.json
model.safetensors
preprocessor_config.json
tokenizer_config.json
special_tokens_map.json
vocab.json
merges.txt
Please refer to the license of the original Whisper model and the license/terms of the dataset used for fine-tuning.
Thanks to:
If you use this model in your project, please cite the original Whisper work and this model repository.
Whisper: Robust Speech Recognition via Large-Scale Weak Supervision
Radford et al., 2022
This model is provided for research and development purposes. Transcription quality may vary depending on the audio, speaker, language, accent, and domain.
license: mit language:
---
license: mit
base_model:
- openai/whisper-small
pipeline_tag: automatic-speech-recognition
tags:
- indonesian
---