Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- km
|
| 4 |
+
license: apache-2.0
|
| 5 |
+
tags:
|
| 6 |
+
- hf-asr-leaderboard
|
| 7 |
+
- generated_from_trainer
|
| 8 |
+
library_name: transformers
|
| 9 |
+
pipeline_tag: automatic-speech-recognition
|
| 10 |
+
base_model:
|
| 11 |
+
- openai/whisper-tiny
|
| 12 |
+
---
|
| 13 |
+
|
| 14 |
+
# Whisper small model for CTranslate2
|
| 15 |
+
|
| 16 |
+
[`PhanithLIM/whisper-tiny-aug-19-april-lightning-v1`](https://huggingface.co/PhanithLIM/whisper-tiny-aug-19-april-lightning-v1) is a fine-tuned version of OpenAI's Whisper ASR model adapted specifically for the **Khmer** language. Built on the **small** variant of Whisper and optimized using **FasterWhisper**, this model provides efficient and accurate speech-to-text transcription for Khmer audio.
|
| 17 |
+
|
| 18 |
+
## 🧠 Model Details
|
| 19 |
+
|
| 20 |
+
- **Base Model**: Whisper Small
|
| 21 |
+
- **Framework**: [FasterWhisper](https://github.com/guillaumela/faster-whisper)
|
| 22 |
+
- **Language**: Khmer (Central Khmer)
|
| 23 |
+
- **Use Case**: Real-time and batch audio transcription in Khmer
|
| 24 |
+
- **Optimization**: Lightweight model for low-latency inference
|
| 25 |
+
|
| 26 |
+
## 🚀 Installation
|
| 27 |
+
|
| 28 |
+
```bash
|
| 29 |
+
pip install faster-whisper
|
| 30 |
+
```
|
| 31 |
+
## 📦 Usage
|
| 32 |
+
|
| 33 |
+
```python
|
| 34 |
+
from faster_whisper import WhisperModel
|
| 35 |
+
|
| 36 |
+
# Load the model
|
| 37 |
+
model = WhisperModel("PhanithLIM/whisper-tiny-khmer-ct2", compute_type="int8", local_files_only=False, beam_size=5)
|
| 38 |
+
|
| 39 |
+
# Transcribe Khmer audio
|
| 40 |
+
segments, info = model.transcribe("your_audio_file.wav")
|
| 41 |
+
|
| 42 |
+
# Print segments
|
| 43 |
+
for segment in segments:
|
| 44 |
+
print(f"{segment.start:.2f}s --> {segment.end:.2f}s: {segment.text}")
|
| 45 |
+
```
|
| 46 |
+
## 🔧 Real-Time Transcription
|
| 47 |
+
This model can be integrated into real-time systems using tools such as:
|
| 48 |
+
- [FastAPI](https://fastapi.tiangolo.com)
|
| 49 |
+
- [FastRTC](https://fastrtc.org/) (WebRTC wrapper for real-time audio streaming)
|
| 50 |
+
- [Gradio](https://www.gradio.app/) (for demo UI)
|
| 51 |
+
|
| 52 |
+
## CTranslate2
|
| 53 |
+
CTranslate2 is a fast inference engine for transformer models, optimized for CPU and GPU deployment, especially in production environments. It's developed by the team behind OpenNMT, and it's widely used in speech and machine translation systems, including FasterWhisper, which is a CTranslate2 port of OpenAI’s Whisper.
|
| 54 |
+
- [How to convert whisper to ct2 ?](https://www.phanithlim.me/c-translate)
|
| 55 |
+
- [CTranslate2](https://opennmt.net/CTranslate2)
|