Spaces:
Running
on
Zero
Running
on
Zero
malvin noel
commited on
Commit
·
c130b3e
1
Parent(s):
7f0f936
correct import whisper cpu
Browse files
scripts/generate_subtitles.py
CHANGED
@@ -88,6 +88,11 @@ def transcribe_audio_to_subs(audio_path):
|
|
88 |
des segments start/end/text, et sauvegarde en .srt.
|
89 |
"""
|
90 |
print("🎙️ Transcription avec Whisper...")
|
|
|
|
|
|
|
|
|
|
|
91 |
import whisper
|
92 |
model = whisper.load_model("medium", device="cpu")
|
93 |
result = model.transcribe(audio_path)
|
|
|
88 |
des segments start/end/text, et sauvegarde en .srt.
|
89 |
"""
|
90 |
print("🎙️ Transcription avec Whisper...")
|
91 |
+
|
92 |
+
# Empêche Torch de détecter CUDA
|
93 |
+
import os
|
94 |
+
os.environ["CUDA_VISIBLE_DEVICES"] = ""
|
95 |
+
|
96 |
import whisper
|
97 |
model = whisper.load_model("medium", device="cpu")
|
98 |
result = model.transcribe(audio_path)
|