Murple/ksponspeech
Updated • 26 • 4
How to use mobi/whisper-medium-zeroth_korean with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("automatic-speech-recognition", model="mobi/whisper-medium-zeroth_korean") # Load model directly
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
processor = AutoProcessor.from_pretrained("mobi/whisper-medium-zeroth_korean")
model = AutoModelForSpeechSeq2Seq.from_pretrained("mobi/whisper-medium-zeroth_korean")The Whisper-medium Model finetunned with KsponSpeech
processor = WhisperProcessor.from_pretrained("openai/whisper-medium", language="ko", task="transcribe")
model = WhisperForConditionalGeneration.from_pretrained('spow12/whisper-medium-zeroth_korean').cuda()
data, _ = librosa.load(wav_path, sr=16000)
input_features = processor(data, sampling_rate=16000, return_tensors="pt").input_features.cuda()
predicted_ids = model.generate(input_features)
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]
| Metric | result |
|---|---|
| WER | 3.96 |
| CER | 1.71 |