Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ def transcribe_and_optionally_translate(video_file, source_language, target_lang
|
|
| 42 |
device = "cpu" # GPU : cuda CPU : cpu
|
| 43 |
compute_type = "int8" # GPU : float16 or int8 - CPU : int8
|
| 44 |
model = WhisperModel(model_size, device=device, compute_type=compute_type)
|
| 45 |
-
segments, _ = model.transcribe(audio_file
|
| 46 |
transcription = " ".join([segment.text for segment in segments])
|
| 47 |
|
| 48 |
# Translation
|
|
|
|
| 42 |
device = "cpu" # GPU : cuda CPU : cpu
|
| 43 |
compute_type = "int8" # GPU : float16 or int8 - CPU : int8
|
| 44 |
model = WhisperModel(model_size, device=device, compute_type=compute_type)
|
| 45 |
+
segments, _ = model.transcribe(audio_file)
|
| 46 |
transcription = " ".join([segment.text for segment in segments])
|
| 47 |
|
| 48 |
# Translation
|