Update transcriber.py
Browse files- transcriber.py +1 -1
transcriber.py
CHANGED
|
@@ -10,7 +10,7 @@ def extract_audio(video_path: str, audio_path: str = "temp_audio.wav") -> str:
|
|
| 10 |
subprocess.run(command, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)
|
| 11 |
return audio_path
|
| 12 |
|
| 13 |
-
def transcribe_audio(audio_path: str, model_size: str = "
|
| 14 |
model = whisper.load_model(model_size)
|
| 15 |
result = model.transcribe(audio_path)
|
| 16 |
transcript = result["text"]
|
|
|
|
| 10 |
subprocess.run(command, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, check=True)
|
| 11 |
return audio_path
|
| 12 |
|
| 13 |
+
def transcribe_audio(audio_path: str, model_size: str = "base") -> str:
|
| 14 |
model = whisper.load_model(model_size)
|
| 15 |
result = model.transcribe(audio_path)
|
| 16 |
transcript = result["text"]
|