Views
No views yet
1from transformers import pipeline
2
3pipe = pipeline(
4 task="automatic-speech-recognition",
5 model="seanghay/whisper-small-khmer",
6)
7
8result = pipe("audio.wav",
9 generate_kwargs={
10 "language":"<|km|>",
11 "task":"transcribe"},
12 batch_size=16
13)
14
15print(result["text"])ffmpeg -i audio.ogg -ar 16000 -ac 1 -c:a pcm_s16le output.wav./main -m ggml-model.bin -f output.wav --print-colors --language kmtraining = google/fleurs['train+validation'] + openslr['train']eval = google/fleurs['test']| Training Loss | Epoch | Step | Validation Loss | Wer |
|---|---|---|---|---|
| 0.2065 | 3.37 | 1000 | 0.3403 | 0.7929 |
| 0.0446 | 6.73 | 2000 | 0.2911 | 0.6961 |
| 0.008 | 10.1 | 3000 | 0.3578 | 0.6627 |
| 0.003 | 13.47 | 4000 | 0.3982 | 0.6564 |
| 0.0012 | 16.84 | 5000 | 0.4287 | 0.6512 |
| 0.0004 | 20.2 | 6000 | 0.4499 | 0.6419 |
| 0.0001 | 23.57 | 7000 | 0.4614 | 0.6469 |
| 0.0001 | 26.94 | 8000 | 0.4657 | 0.6464 |