Views
No views yet
| metric | dataset | waveletdeboshir/whisper-small-ru-pruned | waveletdeboshir/whisper-small-ru-pruned-ft |
|---|---|---|---|
| WER (without punctuation) | common_voice_15_0_test | 0.1748 | 0.1092 |
| WER | common_voice_15_0_test | 0.2492 | 0.1571 |
| openai/whisper-small | waveletdeboshir/whisper-small-ru-pruned | |
|---|---|---|
| n of parameters | 242 M | 205 M |
| n of parameters (with proj_out layer) | 281 M | 208 M |
| model file size | 967 Mb | 821 Mb |
| vocab_size | 51865 | 4207 |
1>>> from transformers import WhisperProcessor, WhisperForConditionalGeneration
2>>> import torchaudio
3
4>>> # load audio
5>>> wav, sr = torchaudio.load("audio.wav")
6
7>>> # load model and processor
8>>> processor = WhisperProcessor.from_pretrained("waveletdeboshir/whisper-small-ru-pruned-ft")
9>>> model = WhisperForConditionalGeneration.from_pretrained("waveletdeboshir/whisper-small-ru-pruned-ft")
10
11>>> input_features = processor(wav[0], sampling_rate=sr, return_tensors="pt").input_features
12
13>>> # generate token ids
14>>> predicted_ids = model.generate(input_features)
15>>> # decode token ids to text
16>>> transcription = processor.batch_decode(predicted_ids, skip_special_tokens=False)
17['<|startoftranscript|><|ru|><|transcribe|><|notimestamps|> Начинаем работу.<|endoftext|>']
18skip_special_tokens=True.