Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,6 @@ import torch
|
|
12 |
import gradio as gr
|
13 |
|
14 |
from config import model_config
|
15 |
-
from gradio_client import Client, handle_file
|
16 |
|
17 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
18 |
model_dir = snapshot_download(model_config['model_dir'])
|
@@ -83,24 +82,4 @@ gr.Interface(
|
|
83 |
inputs=inputs,
|
84 |
outputs=outputs,
|
85 |
title="ASR Transcription with FunASR"
|
86 |
-
).launch()
|
87 |
-
|
88 |
-
|
89 |
-
client = Client("TaiYouWeb/funasr-svsmall-cpu")
|
90 |
-
result = client.predict(
|
91 |
-
file_path=handle_file('https://github.com/gradio-app/gradio/raw/main/test/test_files/audio_sample.wav'),
|
92 |
-
vad_model="fsmn-vad",
|
93 |
-
vad_kwargs="{'max_single_segment_time': 30000}",
|
94 |
-
ncpu=4,
|
95 |
-
batch_size=1,
|
96 |
-
language="auto",
|
97 |
-
use_itn=True,
|
98 |
-
batch_size_s=60,
|
99 |
-
merge_vad=True,
|
100 |
-
merge_length_s=15,
|
101 |
-
batch_size_threshold_s=50,
|
102 |
-
hotword=" ",
|
103 |
-
spk_model="cam++",
|
104 |
-
ban_emo_unk=False,
|
105 |
-
api_name="/asr"
|
106 |
-
)
|
|
|
12 |
import gradio as gr
|
13 |
|
14 |
from config import model_config
|
|
|
15 |
|
16 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
17 |
model_dir = snapshot_download(model_config['model_dir'])
|
|
|
82 |
inputs=inputs,
|
83 |
outputs=outputs,
|
84 |
title="ASR Transcription with FunASR"
|
85 |
+
).launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|