imvladikon
commited on
Commit
•
241e89a
1
Parent(s):
6a7f393
Update README.md
Browse files
README.md
CHANGED
@@ -64,9 +64,30 @@ The following hyperparameters were used during training:
|
|
64 |
|
65 |
### Inference
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
#### whisper.cpp
|
68 |
|
69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
70 |
|
71 |
### Framework versions
|
72 |
|
|
|
64 |
|
65 |
### Inference
|
66 |
|
67 |
+
#### HF
|
68 |
+
|
69 |
+
```python
|
70 |
+
from transformers import pipeline
|
71 |
+
pipe = pipeline("automatic-speech-recognition", model="imvladikon/whisper-medium-he", device_map="auto") # requires `pip install accelerate`
|
72 |
+
print(recognize("sample.mp3"))
|
73 |
+
```
|
74 |
+
|
75 |
#### whisper.cpp
|
76 |
|
77 |
+
Prepared : https://huggingface.co/imvladikon/whisper-medium-he/blob/main/ggml-hebrew.bin
|
78 |
+
|
79 |
+
But if need to convert:
|
80 |
+
```bash
|
81 |
+
git clone https://github.com/openai/whisper
|
82 |
+
git clone https://github.com/ggerganov/whisper.cpp
|
83 |
+
git clone https://huggingface.co/imvladikon/whisper-medium-he
|
84 |
+
python3 ./whisper.cpp/models/convert-h5-to-ggml.py ./whisper-medium-he/ ./whisper .
|
85 |
+
```
|
86 |
+
|
87 |
+
Then possible to check (if produced model is `ggml-model.bin`):
|
88 |
+
```bash
|
89 |
+
cd whisper.cpp && ./main -m ../ggml-model.bin -f ../sample.wav
|
90 |
+
```
|
91 |
|
92 |
### Framework versions
|
93 |
|