File size: 1,999 Bytes
a93fdc6
 
9441809
af5371e
ac60cf4
af5371e
9441809
 
af5371e
9441809
 
af5371e
 
 
 
 
 
 
 
 
 
 
 
 
695eb6d
af5371e
 
 
 
 
 
 
 
 
695eb6d
af5371e
a93fdc6
 
c0dd6d9
af5371e
 
 
c72057b
9441809
695eb6d
 
c72057b
af5371e
a93fdc6
 
 
 
 
 
fe1296e
a93fdc6
 
 
 
fe1296e
 
 
a93fdc6
af5371e
fe1296e
c437e3d
fe1296e
 
 
 
d0af0bd
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-tiny
model-index:
- name: whisper-tiny-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: 73.5%
      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: 56.4%
      name: test
---

# whisper-tiny-khmer-mlx-fp32
This model was converted to MLX format from [`openai-whisper-tiny`](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:
- 73.5% on `test` split of [google/fleurs](https://huggingface.co/datasets/google/fleurs) `km-kh`
- 56.4% 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-tiny-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-tiny-khmer-mlx-fp32 --task transcribe SPEECH_FILE_NAME --fp16 False
```