HoneyTian commited on
Commit
25144ed
·
1 Parent(s): 2b31b9b
Files changed (2) hide show
  1. main.py +35 -35
  2. silero/build_silero_vad.sh +2 -1
main.py CHANGED
@@ -109,46 +109,46 @@ def main():
109
  upload_button = gr.Button("Run VAD")
110
  uploaded_output = gr.Textbox(label="outputs")
111
 
112
- gr.Examples(
113
- examples=examples,
114
- inputs=[
115
- uploaded_vad_engine,
116
- uploaded_file,
117
- uploaded_silence_time,
118
- uploaded_longest_activate,
119
- ],
120
- outputs=[
121
- uploaded_output
122
- ],
123
- fn=process_uploaded_file
124
- )
125
-
126
- upload_button.click(
127
- process_uploaded_file,
128
- inputs=[
129
- uploaded_vad_engine,
130
- uploaded_file,
131
- uploaded_silence_time,
132
- uploaded_longest_activate,
133
- ],
134
- outputs=[
135
- uploaded_output
136
- ],
137
- )
138
  with gr.TabItem("shell"):
139
  shell_text = gr.Textbox(label="cmd")
140
  shell_button = gr.Button("run")
141
  shell_output = gr.Textbox(label="output")
142
 
143
- shell_button.click(
144
- shell,
145
- inputs=[
146
- shell_text,
147
- ],
148
- outputs=[
149
- shell_output
150
- ],
151
- )
152
 
153
  blocks.queue().launch(
154
  share=False if platform.system() == "Windows" else False,
 
109
  upload_button = gr.Button("Run VAD")
110
  uploaded_output = gr.Textbox(label="outputs")
111
 
112
+ gr.Examples(
113
+ examples=examples,
114
+ inputs=[
115
+ uploaded_vad_engine,
116
+ uploaded_file,
117
+ uploaded_silence_time,
118
+ uploaded_longest_activate,
119
+ ],
120
+ outputs=[
121
+ uploaded_output
122
+ ],
123
+ fn=process_uploaded_file
124
+ )
125
+
126
+ upload_button.click(
127
+ process_uploaded_file,
128
+ inputs=[
129
+ uploaded_vad_engine,
130
+ uploaded_file,
131
+ uploaded_silence_time,
132
+ uploaded_longest_activate,
133
+ ],
134
+ outputs=[
135
+ uploaded_output
136
+ ],
137
+ )
138
  with gr.TabItem("shell"):
139
  shell_text = gr.Textbox(label="cmd")
140
  shell_button = gr.Button("run")
141
  shell_output = gr.Textbox(label="output")
142
 
143
+ shell_button.click(
144
+ shell,
145
+ inputs=[
146
+ shell_text,
147
+ ],
148
+ outputs=[
149
+ shell_output
150
+ ],
151
+ )
152
 
153
  blocks.queue().launch(
154
  share=False if platform.system() == "Windows" else False,
silero/build_silero_vad.sh CHANGED
@@ -6,7 +6,8 @@ wget https://github.com/microsoft/onnxruntime/releases/download/v1.20.1/onnxrunt
6
  tar -zxvf onnxruntime-linux-x64-1.20.1.tgz
7
  export C_INCLUDE_PATH=$C_INCLUDE_PATH:$(pwd)/onnxruntime-linux-x64-1.20.1/include
8
  export LIBRARY_PATH=$LIBRARY_PATH:$(pwd)/onnxruntime-linux-x64-1.20.1/lib
9
- export LD_LIBRARY_PATH=$(pwd)/onnxruntime-linux-x64-1.20.1/lib:$LD_LIBRARY_PATH
 
10
 
11
  # download model
12
  # https://github.com/snakers4/silero-vad/tree/master/src/silero_vad/data
 
6
  tar -zxvf onnxruntime-linux-x64-1.20.1.tgz
7
  export C_INCLUDE_PATH=$C_INCLUDE_PATH:$(pwd)/onnxruntime-linux-x64-1.20.1/include
8
  export LIBRARY_PATH=$LIBRARY_PATH:$(pwd)/onnxruntime-linux-x64-1.20.1/lib
9
+ #export LD_LIBRARY_PATH=$(pwd)/onnxruntime-linux-x64-1.20.1/lib:$LD_LIBRARY_PATH
10
+ cp $(pwd)/onnxruntime-linux-x64-1.20.1/lib/* /usr/local/lib/
11
 
12
  # download model
13
  # https://github.com/snakers4/silero-vad/tree/master/src/silero_vad/data