Commit
•
f3c4947
0
Parent(s):
Duplicate from guillaumekln/faster-whisper-medium
Browse filesCo-authored-by: Guillaume Klein <guillaumekln@users.noreply.huggingface.co>
- .gitattributes +34 -0
- README.md +140 -0
- config.json +223 -0
- model.bin +3 -0
- tokenizer.json +0 -0
- vocabulary.txt +0 -0
.gitattributes
ADDED
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
28 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
29 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
30 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
31 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
32 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
33 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
34 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
- zh
|
5 |
+
- de
|
6 |
+
- es
|
7 |
+
- ru
|
8 |
+
- ko
|
9 |
+
- fr
|
10 |
+
- ja
|
11 |
+
- pt
|
12 |
+
- tr
|
13 |
+
- pl
|
14 |
+
- ca
|
15 |
+
- nl
|
16 |
+
- ar
|
17 |
+
- sv
|
18 |
+
- it
|
19 |
+
- id
|
20 |
+
- hi
|
21 |
+
- fi
|
22 |
+
- vi
|
23 |
+
- he
|
24 |
+
- uk
|
25 |
+
- el
|
26 |
+
- ms
|
27 |
+
- cs
|
28 |
+
- ro
|
29 |
+
- da
|
30 |
+
- hu
|
31 |
+
- ta
|
32 |
+
- 'no'
|
33 |
+
- th
|
34 |
+
- ur
|
35 |
+
- hr
|
36 |
+
- bg
|
37 |
+
- lt
|
38 |
+
- la
|
39 |
+
- mi
|
40 |
+
- ml
|
41 |
+
- cy
|
42 |
+
- sk
|
43 |
+
- te
|
44 |
+
- fa
|
45 |
+
- lv
|
46 |
+
- bn
|
47 |
+
- sr
|
48 |
+
- az
|
49 |
+
- sl
|
50 |
+
- kn
|
51 |
+
- et
|
52 |
+
- mk
|
53 |
+
- br
|
54 |
+
- eu
|
55 |
+
- is
|
56 |
+
- hy
|
57 |
+
- ne
|
58 |
+
- mn
|
59 |
+
- bs
|
60 |
+
- kk
|
61 |
+
- sq
|
62 |
+
- sw
|
63 |
+
- gl
|
64 |
+
- mr
|
65 |
+
- pa
|
66 |
+
- si
|
67 |
+
- km
|
68 |
+
- sn
|
69 |
+
- yo
|
70 |
+
- so
|
71 |
+
- af
|
72 |
+
- oc
|
73 |
+
- ka
|
74 |
+
- be
|
75 |
+
- tg
|
76 |
+
- sd
|
77 |
+
- gu
|
78 |
+
- am
|
79 |
+
- yi
|
80 |
+
- lo
|
81 |
+
- uz
|
82 |
+
- fo
|
83 |
+
- ht
|
84 |
+
- ps
|
85 |
+
- tk
|
86 |
+
- nn
|
87 |
+
- mt
|
88 |
+
- sa
|
89 |
+
- lb
|
90 |
+
- my
|
91 |
+
- bo
|
92 |
+
- tl
|
93 |
+
- mg
|
94 |
+
- as
|
95 |
+
- tt
|
96 |
+
- haw
|
97 |
+
- ln
|
98 |
+
- ha
|
99 |
+
- ba
|
100 |
+
- jw
|
101 |
+
- su
|
102 |
+
tags:
|
103 |
+
- audio
|
104 |
+
- automatic-speech-recognition
|
105 |
+
license: mit
|
106 |
+
library_name: ctranslate2
|
107 |
+
---
|
108 |
+
|
109 |
+
# Whisper medium model for CTranslate2
|
110 |
+
|
111 |
+
This repository contains the conversion of [openai/whisper-medium](https://huggingface.co/openai/whisper-medium) to the [CTranslate2](https://github.com/OpenNMT/CTranslate2) model format.
|
112 |
+
|
113 |
+
This model can be used in CTranslate2 or projects based on CTranslate2 such as [faster-whisper](https://github.com/guillaumekln/faster-whisper).
|
114 |
+
|
115 |
+
## Example
|
116 |
+
|
117 |
+
```python
|
118 |
+
from faster_whisper import WhisperModel
|
119 |
+
|
120 |
+
model = WhisperModel("medium")
|
121 |
+
|
122 |
+
segments, info = model.transcribe("audio.mp3")
|
123 |
+
for segment in segments:
|
124 |
+
print("[%.2fs -> %.2fs] %s" % (segment.start, segment.end, segment.text))
|
125 |
+
```
|
126 |
+
|
127 |
+
## Conversion details
|
128 |
+
|
129 |
+
The original model was converted with the following command:
|
130 |
+
|
131 |
+
```
|
132 |
+
ct2-transformers-converter --model openai/whisper-medium --output_dir faster-whisper-medium \
|
133 |
+
--copy_files tokenizer.json --quantization float16
|
134 |
+
```
|
135 |
+
|
136 |
+
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).
|
137 |
+
|
138 |
+
## More information
|
139 |
+
|
140 |
+
**For more information about the original model, see its [model card](https://huggingface.co/openai/whisper-medium).**
|
config.json
ADDED
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|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|
15 |
+
[
|
16 |
+
16,
|
17 |
+
1
|
18 |
+
],
|
19 |
+
[
|
20 |
+
20,
|
21 |
+
0
|
22 |
+
],
|
23 |
+
[
|
24 |
+
23,
|
25 |
+
4
|
26 |
+
]
|
27 |
+
],
|
28 |
+
"lang_ids": [
|
29 |
+
50259,
|
30 |
+
50260,
|
31 |
+
50261,
|
32 |
+
50262,
|
33 |
+
50263,
|
34 |
+
50264,
|
35 |
+
50265,
|
36 |
+
50266,
|
37 |
+
50267,
|
38 |
+
50268,
|
39 |
+
50269,
|
40 |
+
50270,
|
41 |
+
50271,
|
42 |
+
50272,
|
43 |
+
50273,
|
44 |
+
50274,
|
45 |
+
50275,
|
46 |
+
50276,
|
47 |
+
50277,
|
48 |
+
50278,
|
49 |
+
50279,
|
50 |
+
50280,
|
51 |
+
50281,
|
52 |
+
50282,
|
53 |
+
50283,
|
54 |
+
50284,
|
55 |
+
50285,
|
56 |
+
50286,
|
57 |
+
50287,
|
58 |
+
50288,
|
59 |
+
50289,
|
60 |
+
50290,
|
61 |
+
50291,
|
62 |
+
50292,
|
63 |
+
50293,
|
64 |
+
50294,
|
65 |
+
50295,
|
66 |
+
50296,
|
67 |
+
50297,
|
68 |
+
50298,
|
69 |
+
50299,
|
70 |
+
50300,
|
71 |
+
50301,
|
72 |
+
50302,
|
73 |
+
50303,
|
74 |
+
50304,
|
75 |
+
50305,
|
76 |
+
50306,
|
77 |
+
50307,
|
78 |
+
50308,
|
79 |
+
50309,
|
80 |
+
50310,
|
81 |
+
50311,
|
82 |
+
50312,
|
83 |
+
50313,
|
84 |
+
50314,
|
85 |
+
50315,
|
86 |
+
50316,
|
87 |
+
50317,
|
88 |
+
50318,
|
89 |
+
50319,
|
90 |
+
50320,
|
91 |
+
50321,
|
92 |
+
50322,
|
93 |
+
50323,
|
94 |
+
50324,
|
95 |
+
50325,
|
96 |
+
50326,
|
97 |
+
50327,
|
98 |
+
50328,
|
99 |
+
50329,
|
100 |
+
50330,
|
101 |
+
50331,
|
102 |
+
50332,
|
103 |
+
50333,
|
104 |
+
50334,
|
105 |
+
50335,
|
106 |
+
50336,
|
107 |
+
50337,
|
108 |
+
50338,
|
109 |
+
50339,
|
110 |
+
50340,
|
111 |
+
50341,
|
112 |
+
50342,
|
113 |
+
50343,
|
114 |
+
50344,
|
115 |
+
50345,
|
116 |
+
50346,
|
117 |
+
50347,
|
118 |
+
50348,
|
119 |
+
50349,
|
120 |
+
50350,
|
121 |
+
50351,
|
122 |
+
50352,
|
123 |
+
50353,
|
124 |
+
50354,
|
125 |
+
50355,
|
126 |
+
50356,
|
127 |
+
50357
|
128 |
+
],
|
129 |
+
"suppress_ids": [
|
130 |
+
1,
|
131 |
+
2,
|
132 |
+
7,
|
133 |
+
8,
|
134 |
+
9,
|
135 |
+
10,
|
136 |
+
14,
|
137 |
+
25,
|
138 |
+
26,
|
139 |
+
27,
|
140 |
+
28,
|
141 |
+
29,
|
142 |
+
31,
|
143 |
+
58,
|
144 |
+
59,
|
145 |
+
60,
|
146 |
+
61,
|
147 |
+
62,
|
148 |
+
63,
|
149 |
+
90,
|
150 |
+
91,
|
151 |
+
92,
|
152 |
+
93,
|
153 |
+
359,
|
154 |
+
503,
|
155 |
+
522,
|
156 |
+
542,
|
157 |
+
873,
|
158 |
+
893,
|
159 |
+
902,
|
160 |
+
918,
|
161 |
+
922,
|
162 |
+
931,
|
163 |
+
1350,
|
164 |
+
1853,
|
165 |
+
1982,
|
166 |
+
2460,
|
167 |
+
2627,
|
168 |
+
3246,
|
169 |
+
3253,
|
170 |
+
3268,
|
171 |
+
3536,
|
172 |
+
3846,
|
173 |
+
3961,
|
174 |
+
4183,
|
175 |
+
4667,
|
176 |
+
6585,
|
177 |
+
6647,
|
178 |
+
7273,
|
179 |
+
9061,
|
180 |
+
9383,
|
181 |
+
10428,
|
182 |
+
10929,
|
183 |
+
11938,
|
184 |
+
12033,
|
185 |
+
12331,
|
186 |
+
12562,
|
187 |
+
13793,
|
188 |
+
14157,
|
189 |
+
14635,
|
190 |
+
15265,
|
191 |
+
15618,
|
192 |
+
16553,
|
193 |
+
16604,
|
194 |
+
18362,
|
195 |
+
18956,
|
196 |
+
20075,
|
197 |
+
21675,
|
198 |
+
22520,
|
199 |
+
26130,
|
200 |
+
26161,
|
201 |
+
26435,
|
202 |
+
28279,
|
203 |
+
29464,
|
204 |
+
31650,
|
205 |
+
32302,
|
206 |
+
32470,
|
207 |
+
36865,
|
208 |
+
42863,
|
209 |
+
47425,
|
210 |
+
49870,
|
211 |
+
50254,
|
212 |
+
50258,
|
213 |
+
50358,
|
214 |
+
50359,
|
215 |
+
50360,
|
216 |
+
50361,
|
217 |
+
50362
|
218 |
+
],
|
219 |
+
"suppress_ids_begin": [
|
220 |
+
220,
|
221 |
+
50257
|
222 |
+
]
|
223 |
+
}
|
model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:9b45e1009dcc4ab601eff815b61d80e60ce3fd8c74c1a14f4a282258286b51ae
|
3 |
+
size 1527906378
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
vocabulary.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|