Erythrocyte89 commited on
Commit
de5123e
·
verified ·
1 Parent(s): c762e80

Upload 4 files

Browse files
main.py CHANGED
@@ -27,13 +27,13 @@ os.makedirs("temp_audio", exist_ok=True)
27
  print("Loading converted mikr/whisper model via faster-whisper...")
28
  device = "cuda" if torch.cuda.is_available() else "cpu"
29
  compute_type = "float16" if device == "cuda" else "int8"
30
-
31
  try:
32
- # Předpokládá se, že složka s modelem je ve stejném adresáři
33
- transcriber = WhisperModel("whisper-small-cs-ct2", device=device, compute_type=compute_type)
34
- print(f"Faster-Whisper loaded successfully on {device}.")
35
  except Exception as e:
36
- print(f"Error loading Faster-Whisper model: {e}")
37
  transcriber = None
38
 
39
  # --- STRUKTURA PRO GEMINI ---
 
27
  print("Loading converted mikr/whisper model via faster-whisper...")
28
  device = "cuda" if torch.cuda.is_available() else "cpu"
29
  compute_type = "float16" if device == "cuda" else "int8"
30
+ # Změna cesty na novou složku a vynucení int8
31
  try:
32
+ # "int8" je nejbezpečnější volba pro rychlost na všech typech PC
33
+ transcriber = WhisperModel("whisper-small-cs-int8", device="cpu", compute_type="int8")
34
+ print("Faster-Whisper (INT8) načten úspěšně na CPU.")
35
  except Exception as e:
36
+ print(f"Chyba při načítání INT8 modelu: {e}")
37
  transcriber = None
38
 
39
  # --- STRUKTURA PRO GEMINI ---
whisper-small-cs-int8/config.json ADDED
@@ -0,0 +1,298 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
106
+ ],
107
+ [
108
+ 8,
109
+ 2
110
+ ],
111
+ [
112
+ 8,
113
+ 3
114
+ ],
115
+ [
116
+ 8,
117
+ 4
118
+ ],
119
+ [
120
+ 8,
121
+ 5
122
+ ],
123
+ [
124
+ 8,
125
+ 6
126
+ ],
127
+ [
128
+ 8,
129
+ 7
130
+ ],
131
+ [
132
+ 8,
133
+ 8
134
+ ],
135
+ [
136
+ 8,
137
+ 9
138
+ ],
139
+ [
140
+ 8,
141
+ 10
142
+ ],
143
+ [
144
+ 8,
145
+ 11
146
+ ],
147
+ [
148
+ 9,
149
+ 0
150
+ ],
151
+ [
152
+ 9,
153
+ 1
154
+ ],
155
+ [
156
+ 9,
157
+ 2
158
+ ],
159
+ [
160
+ 9,
161
+ 3
162
+ ],
163
+ [
164
+ 9,
165
+ 4
166
+ ],
167
+ [
168
+ 9,
169
+ 5
170
+ ],
171
+ [
172
+ 9,
173
+ 6
174
+ ],
175
+ [
176
+ 9,
177
+ 7
178
+ ],
179
+ [
180
+ 9,
181
+ 8
182
+ ],
183
+ [
184
+ 9,
185
+ 9
186
+ ],
187
+ [
188
+ 9,
189
+ 10
190
+ ],
191
+ [
192
+ 9,
193
+ 11
194
+ ],
195
+ [
196
+ 10,
197
+ 0
198
+ ],
199
+ [
200
+ 10,
201
+ 1
202
+ ],
203
+ [
204
+ 10,
205
+ 2
206
+ ],
207
+ [
208
+ 10,
209
+ 3
210
+ ],
211
+ [
212
+ 10,
213
+ 4
214
+ ],
215
+ [
216
+ 10,
217
+ 5
218
+ ],
219
+ [
220
+ 10,
221
+ 6
222
+ ],
223
+ [
224
+ 10,
225
+ 7
226
+ ],
227
+ [
228
+ 10,
229
+ 8
230
+ ],
231
+ [
232
+ 10,
233
+ 9
234
+ ],
235
+ [
236
+ 10,
237
+ 10
238
+ ],
239
+ [
240
+ 10,
241
+ 11
242
+ ],
243
+ [
244
+ 11,
245
+ 0
246
+ ],
247
+ [
248
+ 11,
249
+ 1
250
+ ],
251
+ [
252
+ 11,
253
+ 2
254
+ ],
255
+ [
256
+ 11,
257
+ 3
258
+ ],
259
+ [
260
+ 11,
261
+ 4
262
+ ],
263
+ [
264
+ 11,
265
+ 5
266
+ ],
267
+ [
268
+ 11,
269
+ 6
270
+ ],
271
+ [
272
+ 11,
273
+ 7
274
+ ],
275
+ [
276
+ 11,
277
+ 8
278
+ ],
279
+ [
280
+ 11,
281
+ 9
282
+ ],
283
+ [
284
+ 11,
285
+ 10
286
+ ],
287
+ [
288
+ 11,
289
+ 11
290
+ ]
291
+ ],
292
+ "lang_ids": [],
293
+ "suppress_ids": null,
294
+ "suppress_ids_begin": [
295
+ 220,
296
+ 50257
297
+ ]
298
+ }
whisper-small-cs-int8/model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5ef83994767baa146c687715d9d8c8d6563152615519017f51fd4cd964757930
3
+ size 244612629
whisper-small-cs-int8/vocabulary.json ADDED
The diff for this file is too large to render. See raw diff