Spaces:
Sleeping
Sleeping
Commit
·
2236a27
1
Parent(s):
a5ceb81
Update app.py
Browse files
app.py
CHANGED
@@ -35,7 +35,11 @@ def open_image():
|
|
35 |
|
36 |
def transcribe(audio):
|
37 |
# Transcribe the audio and split the string into a list of words
|
38 |
-
|
|
|
|
|
|
|
|
|
39 |
|
40 |
transcribed_audio = transcribed_audio.replace(",", "")
|
41 |
transcribed_audio = transcribed_audio.replace(".", "")
|
|
|
35 |
|
36 |
def transcribe(audio):
|
37 |
# Transcribe the audio and split the string into a list of words
|
38 |
+
try:
|
39 |
+
transcribed_audio = pipe(audio)["text"]
|
40 |
+
except:
|
41 |
+
return "Encountered an error. Are you sure you recorded audio before submitting?"
|
42 |
+
|
43 |
|
44 |
transcribed_audio = transcribed_audio.replace(",", "")
|
45 |
transcribed_audio = transcribed_audio.replace(".", "")
|