Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -6,15 +6,8 @@ import numpy as np
|
|
6 |
from scipy import signal
|
7 |
import os
|
8 |
|
9 |
-
|
10 |
-
|
11 |
-
flagged_dir = "/data/flagged"
|
12 |
-
|
13 |
-
os.makedirs(cache_dir, exist_ok=True)
|
14 |
-
os.makedirs(flagged_dir, exist_ok=True)
|
15 |
-
|
16 |
-
processor = WhisperProcessor.from_pretrained("openai/whisper-large-v3", cache_dir=cache_dir)
|
17 |
-
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large-v3", cache_dir=cache_dir)
|
18 |
|
19 |
def process_audio(audio_path):
|
20 |
waveform, sr = sf.read(audio_path)
|
@@ -34,7 +27,6 @@ demo = gr.Interface(
|
|
34 |
outputs="text",
|
35 |
title="Македонско препознавање на говор / Macedonian Speech Recognition",
|
36 |
description="Качете аудио или користете микрофон за транскрипција на македонски говор / Upload audio or use microphone to transcribe Macedonian speech",
|
37 |
-
flagging_dir=flagged_dir,
|
38 |
allow_flagging="manual",
|
39 |
flagging_options=["Incorrect Transcription", "Good Transcription"]
|
40 |
)
|
|
|
6 |
from scipy import signal
|
7 |
import os
|
8 |
|
9 |
+
processor = WhisperProcessor.from_pretrained("openai/whisper-large-v3")
|
10 |
+
model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-large-v3")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
|
12 |
def process_audio(audio_path):
|
13 |
waveform, sr = sf.read(audio_path)
|
|
|
27 |
outputs="text",
|
28 |
title="Македонско препознавање на говор / Macedonian Speech Recognition",
|
29 |
description="Качете аудио или користете микрофон за транскрипција на македонски говор / Upload audio or use microphone to transcribe Macedonian speech",
|
|
|
30 |
allow_flagging="manual",
|
31 |
flagging_options=["Incorrect Transcription", "Good Transcription"]
|
32 |
)
|