seanghay/km-speech-corpus
Viewer • Updated • 14.9k • 132 • 7
How to use mlx-community/whisper-tiny-khmer-mlx-fp16 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir whisper-tiny-khmer-mlx-fp16 mlx-community/whisper-tiny-khmer-mlx-fp16
This model was converted to MLX format from openai-whisper-tiny, then fine-tined to Khmer language using two datasets:
It achieves the following word error rate (wer) on 2 popular datasets:
test split of google/fleurs km-khtrain split of openslr/openslr SLR42NOTE 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-fp16",
fp16=True
)
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-fp16 --task transcribe SPEECH_FILE_NAME --fp16 True
Quantized