Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,6 @@ model = AutoModel(
|
|
26 |
trust_remote_code=False,
|
27 |
remote_code="./model.py",
|
28 |
vad_model="fsmn-vad",
|
29 |
-
punc_model="iic/speech_campplus_sv_zh-cn_16k-common",
|
30 |
vad_kwargs={"max_single_segment_time": 15000},
|
31 |
ncpu=torch.get_num_threads(),
|
32 |
batch_size=1,
|
@@ -34,7 +33,7 @@ model = AutoModel(
|
|
34 |
device=device,
|
35 |
)
|
36 |
|
37 |
-
def transcribe_audio(file_path, vad_model="fsmn-vad",
|
38 |
batch_size=1, language="auto", use_itn=True, batch_size_s=60,
|
39 |
merge_vad=True, merge_length_s=15, batch_size_threshold_s=50,
|
40 |
hotword=" ", ban_emo_unk=True):
|
@@ -66,7 +65,6 @@ def transcribe_audio(file_path, vad_model="fsmn-vad", punc_model="iic/speech_cam
|
|
66 |
inputs = [
|
67 |
gr.Audio(type="filepath"),
|
68 |
gr.Textbox(value="fsmn-vad", label="VAD Model"),
|
69 |
-
gr.Textbox(value="iic/speech_campplus_sv_zh-cn_16k-common", label="PUNC Model"),
|
70 |
gr.Textbox(value='{"max_single_segment_time": 15000}', label="VAD Kwargs"),
|
71 |
gr.Slider(1, 10, value=1, step=1, label="Batch Size"),
|
72 |
gr.Textbox(value="auto", label="Language"),
|
|
|
26 |
trust_remote_code=False,
|
27 |
remote_code="./model.py",
|
28 |
vad_model="fsmn-vad",
|
|
|
29 |
vad_kwargs={"max_single_segment_time": 15000},
|
30 |
ncpu=torch.get_num_threads(),
|
31 |
batch_size=1,
|
|
|
33 |
device=device,
|
34 |
)
|
35 |
|
36 |
+
def transcribe_audio(file_path, vad_model="fsmn-vad", vad_kwargs='{"max_single_segment_time": 15000}',
|
37 |
batch_size=1, language="auto", use_itn=True, batch_size_s=60,
|
38 |
merge_vad=True, merge_length_s=15, batch_size_threshold_s=50,
|
39 |
hotword=" ", ban_emo_unk=True):
|
|
|
65 |
inputs = [
|
66 |
gr.Audio(type="filepath"),
|
67 |
gr.Textbox(value="fsmn-vad", label="VAD Model"),
|
|
|
68 |
gr.Textbox(value='{"max_single_segment_time": 15000}', label="VAD Kwargs"),
|
69 |
gr.Slider(1, 10, value=1, step=1, label="Batch Size"),
|
70 |
gr.Textbox(value="auto", label="Language"),
|