File size: 2,005 Bytes
dc07daa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
be7c0ad
dc07daa
 
 
 
 
 
 
 
 
be7c0ad
dc07daa
 
 
 
 
 
 
 
 
be7c0ad
 
dc07daa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
---
library_name: mlx
license: apache-2.0
language:
- km
pipeline_tag: automatic-speech-recognition
datasets:
- seanghay/km-speech-corpus
- seanghay/khmer_mwpt_speech
tags:
- Khmer
- mlx
base_model: openai-whisper-small
model-index:
- name: whisper-small-khmer-mlx-fp32 by Kimang KHUN
  results:
  - task:
      type: automatic-speech-recognition
      name: Speech Recognition
    dataset:
      name: test split of "km_kh" in google/fleurs
      type: google/fleurs
    metrics:
    - type: wer
      value: 52.3%
      name: test
  - task:
      type: automatic-speech-recognition
      name: Speech Recognition
    dataset:
      name: train split of "SLR42" in openslr/openslr
      type: openslr/openslr
    metrics:
    - type: wer
      value: 51.2%
      name: test
---

# whisper-small-khmer-mlx-fp32
This model was converted to MLX format from [`openai-whisper-small`](https://github.com/openai/whisper), then fine-tined to Khmer language using two datasets:
- [seanghay/khmer_mpwt_speech](https://huggingface.com/datasets/seanghay/khmer_mpwt_speech)
- [seanghay/km-speech-corpus](https://huggingface.com/datasets/seanghay/km-speech-corpus)

It achieves the following __word error rate__ (`wer`) on 2 popular datasets:
- 52.3% on `test` split of [google/fleurs](https://huggingface.co/datasets/google/fleurs) `km-kh`
- 51.2% on `train` split of [openslr/openslr](https://huggingface.co/datasets/openslr/openslr) `SLR42`

__NOTE__ MLX format is usable for M-chip series of Apple.

## Use with mlx
```bash
pip install mlx-whisper
```

Write a python script, `example.py`, as the following
```python
import mlx_whisper

result = mlx_whisper.transcribe(
    SPEECH_FILE_NAME,
    path_or_hf_repo="Kimang18/whisper-small-khmer-mlx-fp32",
    fp16=False
)
print(result['text'])
```
Then execute this script `example.py` to see the result.

You can also use command line in terminal
```bash
mlx_whisper --model Kimang18/whisper-small-khmer-mlx-fp32 --task transcribe SPEECH_FILE_NAME --fp16 False
```