Downloads · 30 days
8
2% of all-time downloads
playwithmino/PhoWhisper-large-peft-VietMed
PhoWhisper-large-peft-VietMed is a machine learning model from playwithmino. 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.
- Base model: vinai/PhoWhisper-large - This model is finetuned on VietMed training set, which reduces the WER on VietMed testset from 26,14 to 21,63. - To reproduce this finetuned model, you can use the same tokenizer…
Downloads · 30 days
8
2% of all-time downloads
All-time downloads
493
Public
Repo size
315 MB
Likes
1
Public
Click a slice to open those files.
.safetensors63 MB · 100%
From the Hugging Face model README
vinai/PhoWhisper-largevinai/PhoWhisper-largeimport torch
from transformers import pipeline, AutoModelForSpeechSeq2Seq, AutoProcessor
sampling_rate, audio_array = wavfile.read("path_to_your_wav_file")
audio_input = {
"path" : "pth_to_your_wav_five",
"array" : audio_array,
"sampling_rate" : sampling_rate
}
device = "cuda" if torch.cuda.is_available() else "cpu"
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
processor = AutoProcessor.from_pretrained("vinai/PhoWhisper-large")
model = AutoModelForSpeechSeq2Seq.from_pretrained(
"playwithmino/PhoWhisper-large-peft-VietMed",
torch_dtype=torch_dtype,
low_cpu_mem_usage=True
)
model.to(device)
transcriber = pipeline(
"automatic-speech-recognition",
model=model,
tokenizer=processor.tokenizer,
feature_extractor=processor.feature_extractor,
chunk_length_s=30,
torch_dtype=torch_dtype,
device=device,
batch_size=32
)
transcriptions = transcriber(audio_inputs)