Create README.md
Browse files
README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- bn
|
| 5 |
+
base_model:
|
| 6 |
+
- sha1779/BengaliRegionalASR
|
| 7 |
+
pipeline_tag: automatic-speech-recognition
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
+
This is the CTranslate2 version which is faster than base version.
|
| 11 |
+
|
| 12 |
+
## requirements
|
| 13 |
+
```bash
|
| 14 |
+
pip install ctranslate2
|
| 15 |
+
```
|
| 16 |
+
## Base model to Ctranslate format conversion
|
| 17 |
+
```bash
|
| 18 |
+
!ct2-transformers-converter --model sha1779/BengaliRegionalASR --output_dir sha1779/Faster_BengaliRegionalASR --copy_files tokenizer.json preprocessor_config.json --quantization float16
|
| 19 |
+
```
|
| 20 |
+
|
| 21 |
+
## Run the model
|
| 22 |
+
```bash
|
| 23 |
+
pip install faster-whisper
|
| 24 |
+
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
```python
|
| 28 |
+
from faster_whisper import WhisperModel
|
| 29 |
+
|
| 30 |
+
model_size = "sha1779/Faster_BengaliRegionalASR"
|
| 31 |
+
|
| 32 |
+
model = WhisperModel(model_size, device="cuda", compute_type="float16")
|
| 33 |
+
segments, info = model.transcribe("audio.mp3", beam_size=5, language="en", condition_on_previous_text=False)
|
| 34 |
+
|
| 35 |
+
for segment in segments:
|
| 36 |
+
print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
|
| 37 |
+
|
| 38 |
+
```
|
| 39 |
+
|