ngkien
commited on
Commit
•
80ddfce
1
Parent(s):
1402fac
Upload the Distil-Whisper medium.en conversion model to the Hugging Face hub
Browse files- .gitattributes +1 -0
- README.md +39 -0
- config.json +265 -0
- model.bin +3 -0
- preprocessor_config.json +14 -0
- tokenizer.json +0 -0
- vocabulary.json +0 -0
.gitattributes
CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
36 |
+
model.bin filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
@@ -1,3 +1,42 @@
|
|
1 |
---
|
|
|
|
|
|
|
|
|
|
|
2 |
license: mit
|
|
|
3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
tags:
|
5 |
+
- audio
|
6 |
+
- automatic-speech-recognition
|
7 |
license: mit
|
8 |
+
library_name: ctranslate2
|
9 |
---
|
10 |
+
|
11 |
+
# Whisper medium.en model for CTranslate2
|
12 |
+
|
13 |
+
This repository contains the conversion of [distil-whisper/distil-medium.en](https://huggingface.co/distil-whisper/distil-medium.en) to the [CTranslate2](https://github.com/OpenNMT/CTranslate2) model format.
|
14 |
+
|
15 |
+
This model can be used in CTranslate2 or projects based on CTranslate2 such as [faster-whisper](https://github.com/systran/faster-whisper).
|
16 |
+
|
17 |
+
## Example
|
18 |
+
|
19 |
+
```python
|
20 |
+
from faster_whisper import WhisperModel
|
21 |
+
|
22 |
+
model = WhisperModel("distil-medium.en")
|
23 |
+
|
24 |
+
segments, info = model.transcribe("audio.mp3")
|
25 |
+
for segment in segments:
|
26 |
+
print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
|
27 |
+
```
|
28 |
+
|
29 |
+
## Conversion details
|
30 |
+
|
31 |
+
The original model was converted with the following command:
|
32 |
+
|
33 |
+
```
|
34 |
+
ct2-transformers-converter --model distil-whisper/distil-medium.en --output_dir faster-distil-whisper-medium.en \
|
35 |
+
--copy_files tokenizer.json preprocessor_config.json --quantization float16
|
36 |
+
```
|
37 |
+
|
38 |
+
Note that the model weights are saved in FP16. This type can be changed when the model is loaded using the [`compute_type` option in CTranslate2](https://opennmt.net/CTranslate2/quantization.html).
|
39 |
+
|
40 |
+
## More information
|
41 |
+
|
42 |
+
**For more information about the original model, see its [model card](https://huggingface.co/distil-whisper/distil-medium.en).**
|
config.json
ADDED
@@ -0,0 +1,265 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
46 |
+
],
|
47 |
+
[
|
48 |
+
1,
|
49 |
+
11
|
50 |
+
],
|
51 |
+
[
|
52 |
+
1,
|
53 |
+
12
|
54 |
+
],
|
55 |
+
[
|
56 |
+
1,
|
57 |
+
13
|
58 |
+
],
|
59 |
+
[
|
60 |
+
1,
|
61 |
+
14
|
62 |
+
],
|
63 |
+
[
|
64 |
+
1,
|
65 |
+
15
|
66 |
+
]
|
67 |
+
],
|
68 |
+
"lang_ids": [
|
69 |
+
50258,
|
70 |
+
50259,
|
71 |
+
50260,
|
72 |
+
50261,
|
73 |
+
50262,
|
74 |
+
50263,
|
75 |
+
50264,
|
76 |
+
50265,
|
77 |
+
50266,
|
78 |
+
50267,
|
79 |
+
50268,
|
80 |
+
50269,
|
81 |
+
50270,
|
82 |
+
50271,
|
83 |
+
50272,
|
84 |
+
50273,
|
85 |
+
50274,
|
86 |
+
50275,
|
87 |
+
50276,
|
88 |
+
50277,
|
89 |
+
50278,
|
90 |
+
50279,
|
91 |
+
50280,
|
92 |
+
50281,
|
93 |
+
50282,
|
94 |
+
50283,
|
95 |
+
50284,
|
96 |
+
50285,
|
97 |
+
50286,
|
98 |
+
50287,
|
99 |
+
50288,
|
100 |
+
50289,
|
101 |
+
50290,
|
102 |
+
50291,
|
103 |
+
50292,
|
104 |
+
50293,
|
105 |
+
50294,
|
106 |
+
50295,
|
107 |
+
50296,
|
108 |
+
50297,
|
109 |
+
50298,
|
110 |
+
50299,
|
111 |
+
50300,
|
112 |
+
50301,
|
113 |
+
50302,
|
114 |
+
50303,
|
115 |
+
50304,
|
116 |
+
50305,
|
117 |
+
50306,
|
118 |
+
50307,
|
119 |
+
50308,
|
120 |
+
50309,
|
121 |
+
50310,
|
122 |
+
50311,
|
123 |
+
50312,
|
124 |
+
50313,
|
125 |
+
50314,
|
126 |
+
50315,
|
127 |
+
50316,
|
128 |
+
50317,
|
129 |
+
50318,
|
130 |
+
50319,
|
131 |
+
50320,
|
132 |
+
50321,
|
133 |
+
50322,
|
134 |
+
50323,
|
135 |
+
50324,
|
136 |
+
50325,
|
137 |
+
50326,
|
138 |
+
50327,
|
139 |
+
50328,
|
140 |
+
50329,
|
141 |
+
50330,
|
142 |
+
50331,
|
143 |
+
50332,
|
144 |
+
50333,
|
145 |
+
50334,
|
146 |
+
50335,
|
147 |
+
50336,
|
148 |
+
50337,
|
149 |
+
50338,
|
150 |
+
50339,
|
151 |
+
50340,
|
152 |
+
50341,
|
153 |
+
50342,
|
154 |
+
50343,
|
155 |
+
50344,
|
156 |
+
50345,
|
157 |
+
50346,
|
158 |
+
50347,
|
159 |
+
50348,
|
160 |
+
50349,
|
161 |
+
50350,
|
162 |
+
50351,
|
163 |
+
50352,
|
164 |
+
50353,
|
165 |
+
50354,
|
166 |
+
50355,
|
167 |
+
50356
|
168 |
+
],
|
169 |
+
"suppress_ids": [
|
170 |
+
1,
|
171 |
+
2,
|
172 |
+
7,
|
173 |
+
8,
|
174 |
+
9,
|
175 |
+
10,
|
176 |
+
14,
|
177 |
+
25,
|
178 |
+
26,
|
179 |
+
27,
|
180 |
+
28,
|
181 |
+
29,
|
182 |
+
31,
|
183 |
+
58,
|
184 |
+
59,
|
185 |
+
60,
|
186 |
+
61,
|
187 |
+
62,
|
188 |
+
63,
|
189 |
+
90,
|
190 |
+
91,
|
191 |
+
92,
|
192 |
+
93,
|
193 |
+
357,
|
194 |
+
366,
|
195 |
+
438,
|
196 |
+
532,
|
197 |
+
685,
|
198 |
+
705,
|
199 |
+
796,
|
200 |
+
930,
|
201 |
+
1058,
|
202 |
+
1220,
|
203 |
+
1267,
|
204 |
+
1279,
|
205 |
+
1303,
|
206 |
+
1343,
|
207 |
+
1377,
|
208 |
+
1391,
|
209 |
+
1635,
|
210 |
+
1782,
|
211 |
+
1875,
|
212 |
+
2162,
|
213 |
+
2361,
|
214 |
+
2488,
|
215 |
+
3467,
|
216 |
+
4008,
|
217 |
+
4211,
|
218 |
+
4600,
|
219 |
+
4808,
|
220 |
+
5299,
|
221 |
+
5855,
|
222 |
+
6329,
|
223 |
+
7203,
|
224 |
+
9609,
|
225 |
+
9959,
|
226 |
+
10563,
|
227 |
+
10786,
|
228 |
+
11420,
|
229 |
+
11709,
|
230 |
+
11907,
|
231 |
+
13163,
|
232 |
+
13697,
|
233 |
+
13700,
|
234 |
+
14808,
|
235 |
+
15306,
|
236 |
+
16410,
|
237 |
+
16791,
|
238 |
+
17992,
|
239 |
+
19203,
|
240 |
+
19510,
|
241 |
+
20724,
|
242 |
+
22305,
|
243 |
+
22935,
|
244 |
+
27007,
|
245 |
+
30109,
|
246 |
+
30420,
|
247 |
+
33409,
|
248 |
+
34949,
|
249 |
+
40283,
|
250 |
+
40493,
|
251 |
+
40549,
|
252 |
+
47282,
|
253 |
+
49146,
|
254 |
+
50257,
|
255 |
+
50357,
|
256 |
+
50358,
|
257 |
+
50359,
|
258 |
+
50360,
|
259 |
+
50361
|
260 |
+
],
|
261 |
+
"suppress_ids_begin": [
|
262 |
+
220,
|
263 |
+
50256
|
264 |
+
]
|
265 |
+
}
|
model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d4cb75d823dcd2647191064da76f026774c06c036908f38456165368d0e2d66a
|
3 |
+
size 788826555
|
preprocessor_config.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"chunk_length": 30,
|
3 |
+
"feature_extractor_type": "WhisperFeatureExtractor",
|
4 |
+
"feature_size": 80,
|
5 |
+
"hop_length": 160,
|
6 |
+
"n_fft": 400,
|
7 |
+
"n_samples": 480000,
|
8 |
+
"nb_max_frames": 3000,
|
9 |
+
"padding_side": "right",
|
10 |
+
"padding_value": 0.0,
|
11 |
+
"processor_class": "WhisperProcessor",
|
12 |
+
"return_attention_mask": false,
|
13 |
+
"sampling_rate": 16000
|
14 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
vocabulary.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|