Spaces:
Runtime error
Runtime error
MSchell0129
commited on
Commit
·
13787ef
1
Parent(s):
72a6d90
16
Browse files- speech_to_text.py +5 -9
speech_to_text.py
CHANGED
@@ -4,10 +4,8 @@ import gradio as gr
|
|
4 |
import os
|
5 |
|
6 |
|
7 |
-
app = gr()
|
8 |
-
#need to make a change to be able to push
|
9 |
|
10 |
-
|
11 |
|
12 |
|
13 |
def transcribe(aud_inp, whisper_lang):
|
@@ -26,16 +24,14 @@ def transcribe(aud_inp, whisper_lang):
|
|
26 |
options = whisper.DecodingOptions()
|
27 |
result = whisper.decode(model, mel, options)
|
28 |
print(result.text)
|
29 |
-
|
30 |
|
31 |
-
block = gr.Blocks()
|
32 |
|
33 |
def run():
|
34 |
-
with
|
35 |
gr.Interface(fn=transcribe, inputs="microphone", outputs="text")
|
36 |
-
|
|
|
37 |
if __name__ == '__main__':
|
38 |
run()
|
39 |
|
40 |
-
if __name__ == '__main__':
|
41 |
-
run()
|
|
|
4 |
import os
|
5 |
|
6 |
|
|
|
|
|
7 |
|
8 |
+
app = gr.Blocks()
|
9 |
|
10 |
|
11 |
def transcribe(aud_inp, whisper_lang):
|
|
|
24 |
options = whisper.DecodingOptions()
|
25 |
result = whisper.decode(model, mel, options)
|
26 |
print(result.text)
|
27 |
+
|
28 |
|
|
|
29 |
|
30 |
def run():
|
31 |
+
with app:
|
32 |
gr.Interface(fn=transcribe, inputs="microphone", outputs="text")
|
33 |
+
app.launch(server_name='0.0.0.0', server_port=7860)
|
34 |
+
|
35 |
if __name__ == '__main__':
|
36 |
run()
|
37 |
|
|
|
|