Spaces:
Build error
Build error
Amended model initialisation
Browse files
app.py
CHANGED
@@ -2,15 +2,16 @@ import gradio as gr
|
|
2 |
import whisper
|
3 |
from pybraille import convertText
|
4 |
|
5 |
-
|
6 |
# Translate speech to braille
|
|
|
|
|
|
|
7 |
def speech_to_text(audio):
|
8 |
"""
|
9 |
|
10 |
:param audio: Speech data
|
11 |
:return: Transcript of speech data
|
12 |
"""
|
13 |
-
model = whisper.load_model('base')
|
14 |
|
15 |
return model.transcribe(audio)
|
16 |
|
|
|
2 |
import whisper
|
3 |
from pybraille import convertText
|
4 |
|
|
|
5 |
# Translate speech to braille
|
6 |
+
model = whisper.load_model('base')
|
7 |
+
|
8 |
+
|
9 |
def speech_to_text(audio):
|
10 |
"""
|
11 |
|
12 |
:param audio: Speech data
|
13 |
:return: Transcript of speech data
|
14 |
"""
|
|
|
15 |
|
16 |
return model.transcribe(audio)
|
17 |
|