YassineKader
commited on
Commit
·
a24e1fd
1
Parent(s):
dfc3922
Update README.md
Browse files
README.md
CHANGED
@@ -15,7 +15,10 @@ This repository contains the conversion of [YassineKader/whisper-small-haitian](
|
|
15 |
This model can be used in CTranslate2 or projects based on CTranslate2 such as [faster-whisper](https://github.com/guillaumekln/faster-whisper).
|
16 |
|
17 |
## Example
|
18 |
-
|
|
|
|
|
|
|
19 |
```python
|
20 |
import ctranslate2
|
21 |
import librosa
|
@@ -28,7 +31,7 @@ processor = transformers.WhisperProcessor.from_pretrained("YassineKader/whisper-
|
|
28 |
inputs = processor(audio, return_tensors="np", sampling_rate=16000)
|
29 |
features = ctranslate2.StorageView.from_array(inputs.input_features)
|
30 |
# Load the model on CPU.
|
31 |
-
model = ctranslate2.models.Whisper("whisper-small-
|
32 |
# Detect the language.
|
33 |
results = model.detect_language(features)
|
34 |
language, probability = results[0][0]
|
|
|
15 |
This model can be used in CTranslate2 or projects based on CTranslate2 such as [faster-whisper](https://github.com/guillaumekln/faster-whisper).
|
16 |
|
17 |
## Example
|
18 |
+
```git
|
19 |
+
#clone the repo
|
20 |
+
git clone https://huggingface.co/YassineKader/faster-whisper-small-haitian
|
21 |
+
```
|
22 |
```python
|
23 |
import ctranslate2
|
24 |
import librosa
|
|
|
31 |
inputs = processor(audio, return_tensors="np", sampling_rate=16000)
|
32 |
features = ctranslate2.StorageView.from_array(inputs.input_features)
|
33 |
# Load the model on CPU.
|
34 |
+
model = ctranslate2.models.Whisper("faster-whisper-small-haitian")
|
35 |
# Detect the language.
|
36 |
results = model.detect_language(features)
|
37 |
language, probability = results[0][0]
|