Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import librosa
|
|
5 |
from extractors.asrdiarization.asr_extractor import ASRExtractorConfig, ASRExtractor
|
6 |
from indexify_extractor_sdk import Content
|
7 |
|
8 |
-
MAX_AUDIO_MINUTES =
|
9 |
|
10 |
asr_extractor = ASRExtractor()
|
11 |
|
@@ -25,7 +25,7 @@ def check_audio(audio_filepath):
|
|
25 |
|
26 |
return audio_filepath
|
27 |
|
28 |
-
@spaces.GPU
|
29 |
def transcribe(audio_filepath, task, batch_size, chunk_length_s, sampling_rate, language, num_speakers, min_speakers, max_speakers, assisted):
|
30 |
if audio_filepath is None:
|
31 |
raise gr.Error("Please provide some input audio: either upload an audio file or use the microphone")
|
|
|
5 |
from extractors.asrdiarization.asr_extractor import ASRExtractorConfig, ASRExtractor
|
6 |
from indexify_extractor_sdk import Content
|
7 |
|
8 |
+
MAX_AUDIO_MINUTES = 120 # wont try to transcribe if longer than this
|
9 |
|
10 |
asr_extractor = ASRExtractor()
|
11 |
|
|
|
25 |
|
26 |
return audio_filepath
|
27 |
|
28 |
+
@spaces.GPU(duration=600)
|
29 |
def transcribe(audio_filepath, task, batch_size, chunk_length_s, sampling_rate, language, num_speakers, min_speakers, max_speakers, assisted):
|
30 |
if audio_filepath is None:
|
31 |
raise gr.Error("Please provide some input audio: either upload an audio file or use the microphone")
|