Try replacing distil-large-v2 with distil-medium.en for faster transcription.
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ def init_speech_to_text_model():
|
|
15 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
16 |
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
17 |
|
18 |
-
model_id = "distil-whisper/distil-
|
19 |
model = AutoModelForSpeechSeq2Seq.from_pretrained(
|
20 |
model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True
|
21 |
)
|
|
|
15 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
16 |
torch_dtype = torch.float16 if torch.cuda.is_available() else torch.float32
|
17 |
|
18 |
+
model_id = "distil-whisper/distil-medium.en"
|
19 |
model = AutoModelForSpeechSeq2Seq.from_pretrained(
|
20 |
model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True
|
21 |
)
|