Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import mlx_whisper | |
| def transcribe(audio): | |
| text = mlx_whisper.transcribe( | |
| audio, | |
| path_or_hf="Kimang18/whisper-tiny-khmer-mlx-fp32", | |
| fp16=False, | |
| condition_on_previous_text=False, | |
| )['text'] | |
| return text | |
| iface = gr.Interface( | |
| fn=transcribe, | |
| inputs=gr.Audio(type="filepath", waveform_options={"sample_rate": 16000}), | |
| outputs="text", | |
| title="Whisper Tiny Khmer", | |
| description="Realtime demo for Khmer speech transcription using a fine-tuned Whisper tiny model.", | |
| ) | |
| iface.launch(share=False) |