Collapseruin commited on
Commit
7c2b7bd
·
1 Parent(s): d3e5066

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -1,3 +1,15 @@
1
  import gradio as gr
2
 
3
- gr.load("models/puyao/whisper-small-hi").launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  import gradio as gr
2
 
3
+ gr.load("models/puyao/whisper-small-hi").launch()
4
+
5
+ def transcribe(audio):
6
+ text = pipe(audio)["text"]
7
+ return text
8
+
9
+ iface = gr.Interface(
10
+ fn=transcribe,
11
+ inputs=gr.Audio(source="microphone", type="filepath"),
12
+ outputs="text",
13
+ title="Whisper Small Chinese",
14
+ description="Realtime demo for Chinese speech recognition using a fine-tuned Whisper small model.",
15
+ )