Instructions to use mlx-community/whisper-base-khmer-mlx-fp32 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/whisper-base-khmer-mlx-fp32 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir whisper-base-khmer-mlx-fp32 mlx-community/whisper-base-khmer-mlx-fp32
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
metadata
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-base
model-index:
- name: whisper-base-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: 69.7%
name: test
whisper-base-khmer-mlx-fp32
This model was converted to MLX format from openai-whisper-base, then fine-tined to Khmer language using three datasets:
- seanghay/khmer_mpwt_speech
- seanghay/km-speech-corpus
trainsplit of openslr/openslrSLR42
It achieves the following word error rate (wer) on 2 popular datasets:
- 69.7% on
testsplit of google/fleurskm-kh
NOTE MLX format is usable for M-chip series of Apple.
Use with mlx
pip install mlx-whisper
Write a python script, example.py, as the following
import mlx_whisper
result = mlx_whisper.transcribe(
SPEECH_FILE_NAME,
path_or_hf_repo="mlx-community/whisper-base-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
mlx_whisper --model mlx-community/whisper-base-khmer-mlx-fp32 --task transcribe SPEECH_FILE_NAME --fp16 False