Downloads · 30 days
10
25% of all-time downloads
fznx92/openai-whisper-large-v2-ja-transcribe-colab
openai-whisper-large-v2-ja-transcribe-colab is a machine learning model from fznx92. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for peft.
Japanese transcription, testing in progress to see results, main personal use cases are japanese comedy
Downloads · 30 days
10
25% of all-time downloads
All-time downloads
40
Public
Repo size
42 MB
Likes
0
Public
Click a slice to open those files.
.safetensors42 MB · 100%
From the Hugging Face model README
Japanese transcription, testing in progress to see results, main personal use cases are japanese comedy
usage 9GB vram with this Lora
openai-whisper-large-v2-LORA-ja
import torch from transformers import ( AutomaticSpeechRecognitionPipeline, WhisperForConditionalGeneration, WhisperTokenizer, WhisperProcessor, ) from peft import PeftModel, PeftConfig
peft_model_id = "fznx92/openai-whisper-large-v2-ja-transcribe-colab" sample = "insert mp3 file location here"
language = "japanese" task = "transcribe"
peft_config = PeftConfig.from_pretrained(peft_model_id) model = WhisperForConditionalGeneration.from_pretrained( peft_config.base_model_name_or_path, ) model = PeftModel.from_pretrained(model, peft_model_id) model.to("cuda").half()
processor = WhisperProcessor.from_pretrained(peft_config.base_model_name_or_path, language=language, task=task)
pipe = AutomaticSpeechRecognitionPipeline(model=model, tokenizer=processor.tokenizer, feature_extractor=processor.feature_extractor, batch_size=8, torch_dtype=torch.float16, device="cuda:0")
def transcribe(audio, return_timestamps=False): text = pipe(audio, chunk_length_s=30, return_timestamps=return_timestamps, generate_kwargs={"language": language, "task": task})["text"] return text
transcript = transcribe(sample) print(transcript)
Common Voice 16 dataset
via Google Colab T5 @ 6 hours