Spaces:
Running
on
Zero
Running
on
Zero
liuyang
commited on
Commit
·
233e4b4
1
Parent(s):
91dc7f1
add space decoration
Browse files
app.py
CHANGED
|
@@ -203,6 +203,7 @@ class WhisperTranscriber:
|
|
| 203 |
except subprocess.CalledProcessError as e:
|
| 204 |
raise RuntimeError(f"Audio conversion failed: {e}")
|
| 205 |
|
|
|
|
| 206 |
def transcribe_audio(self, audio_path, language=None, translate=False, prompt=None):
|
| 207 |
"""Transcribe audio using Whisper with flash attention"""
|
| 208 |
|
|
@@ -463,6 +464,7 @@ def format_segments_for_display(result):
|
|
| 463 |
|
| 464 |
return output
|
| 465 |
|
|
|
|
| 466 |
def process_audio_gradio(audio_file, num_speakers, language, translate, prompt, group_segments):
|
| 467 |
"""Gradio interface function"""
|
| 468 |
result = transcriber.process_audio(
|
|
|
|
| 203 |
except subprocess.CalledProcessError as e:
|
| 204 |
raise RuntimeError(f"Audio conversion failed: {e}")
|
| 205 |
|
| 206 |
+
@spaces.GPU
|
| 207 |
def transcribe_audio(self, audio_path, language=None, translate=False, prompt=None):
|
| 208 |
"""Transcribe audio using Whisper with flash attention"""
|
| 209 |
|
|
|
|
| 464 |
|
| 465 |
return output
|
| 466 |
|
| 467 |
+
@spaces.GPU
|
| 468 |
def process_audio_gradio(audio_file, num_speakers, language, translate, prompt, group_segments):
|
| 469 |
"""Gradio interface function"""
|
| 470 |
result = transcriber.process_audio(
|