Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -146,7 +146,8 @@ def process_audio_file(file):
|
|
| 146 |
data = librosa.to_mono(data)
|
| 147 |
return data
|
| 148 |
|
| 149 |
-
def transcribe(audio, state = "", im4 = "", file = ""):
|
|
|
|
| 150 |
# Grant additional context
|
| 151 |
# time.sleep(1)
|
| 152 |
if state is None:
|
|
@@ -178,15 +179,15 @@ iface = gr.Interface(
|
|
| 178 |
outputs=[
|
| 179 |
"textbox",
|
| 180 |
"state",
|
| 181 |
-
gr.HighlightedText(label="HighlightedText", color_map={"punc": "pink", "test 0": "blue"}),
|
| 182 |
-
gr.HighlightedText(label="HighlightedText", show_legend=True),
|
| 183 |
-
gr.JSON(label="JSON"),
|
| 184 |
-
gr.HTML(label="HTML"),
|
| 185 |
],
|
| 186 |
layout="horizontal",
|
| 187 |
theme="huggingface",
|
| 188 |
title="🗣️LiveSpeechRecognition🧠Memory💾",
|
| 189 |
-
description=f"Live Automatic Speech Recognition (ASR) with Memory💾 Dataset
|
| 190 |
allow_flagging='never',
|
| 191 |
live=True,
|
| 192 |
article=f"Result Output Saved to Memory💾 Dataset: [{DATASET_REPO_URL}]({DATASET_REPO_URL})"
|
|
|
|
| 146 |
data = librosa.to_mono(data)
|
| 147 |
return data
|
| 148 |
|
| 149 |
+
#def transcribe(audio, state = "", im4 = "", file = ""):
|
| 150 |
+
def transcribe(audio, state = "", im4 = None, file = None):
|
| 151 |
# Grant additional context
|
| 152 |
# time.sleep(1)
|
| 153 |
if state is None:
|
|
|
|
| 179 |
outputs=[
|
| 180 |
"textbox",
|
| 181 |
"state",
|
| 182 |
+
#gr.HighlightedText(label="HighlightedText", color_map={"punc": "pink", "test 0": "blue"}),
|
| 183 |
+
#gr.HighlightedText(label="HighlightedText", show_legend=True),
|
| 184 |
+
#gr.JSON(label="JSON"),
|
| 185 |
+
#gr.HTML(label="HTML"),
|
| 186 |
],
|
| 187 |
layout="horizontal",
|
| 188 |
theme="huggingface",
|
| 189 |
title="🗣️LiveSpeechRecognition🧠Memory💾",
|
| 190 |
+
description=f"Live Automatic Speech Recognition (ASR) with Memory💾 Dataset.",
|
| 191 |
allow_flagging='never',
|
| 192 |
live=True,
|
| 193 |
article=f"Result Output Saved to Memory💾 Dataset: [{DATASET_REPO_URL}]({DATASET_REPO_URL})"
|