TaiYouWeb commited on
Commit
48b5bc5
1 Parent(s): 57ca333

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +23 -2
app.py CHANGED
@@ -73,6 +73,27 @@ def transcribe_audio(file, vad_model="fsmn-vad", vad_kwargs='{"max_single_segmen
73
 
74
  # 创建Gradio界面
75
  inputs = [
76
- gr.Audio(type="file"), # 上传音频,移除了source参数
77
  gr.Textbox(value="fsmn-vad", label="VAD Model"),
78
- gr.Tex
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
 
74
  # 创建Gradio界面
75
  inputs = [
76
+ gr.Audio(type="file"), # 上传音频
77
  gr.Textbox(value="fsmn-vad", label="VAD Model"),
78
+ gr.Textbox(value='{"max_single_segment_time": 30000}', label="VAD Kwargs"),
79
+ gr.Slider(1, 8, value=4, step=1, label="NCPU"),
80
+ gr.Slider(1, 10, value=1, step=1, label="Batch Size"),
81
+ gr.Textbox(value="auto", label="Language"),
82
+ gr.Checkbox(value=True, label="Use ITN"),
83
+ gr.Slider(30, 120, value=60, step=1, label="Batch Size (seconds)"),
84
+ gr.Checkbox(value=True, label="Merge VAD"),
85
+ gr.Slider(5, 60, value=15, step=1, label="Merge Length (seconds)"),
86
+ gr.Slider(10, 100, value=50, step=1, label="Batch Size Threshold (seconds)"),
87
+ gr.Textbox(value=" ", label="Hotword"),
88
+ gr.Textbox(value="cam++", label="Speaker Model"),
89
+ gr.Checkbox(value=False, label="Ban Emotional Unknown"),
90
+ ]
91
+
92
+ outputs = gr.Textbox(label="Transcription")
93
+
94
+ gr.Interface(
95
+ fn=transcribe_audio,
96
+ inputs=inputs,
97
+ outputs=outputs,
98
+ title="ASR Transcription with FunASR"
99
+ ).launch()