seanghay/km-speech-corpus
Viewer • Updated • 14.9k • 130 • 7
How to use mlx-community/whisper-tiny-khmer-mlx-fp32 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir whisper-tiny-khmer-mlx-fp32 mlx-community/whisper-tiny-khmer-mlx-fp32
This model was converted to MLX format from openai-whisper-tiny, then fine-tined to Khmer language using three datasets:
train split of openslr/openslr SLR42It achieves the following word error rate (wer) on 2 popular datasets:
test split of google/fleurs km-khNOTE MLX format is usable for M-chip series of Apple.
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-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
mlx_whisper --model mlx-community/whisper-tiny-khmer-mlx-fp32 --task transcribe SPEECH_FILE_NAME --fp16 False
Quantized