From 4137f5cf26e7c4b40853959cd2574edfde03aa60 Mon Sep 17 00:00:00 2001
From: 志浩 <neo.dzh@alibaba-inc.com>
Date: 星期五, 07 四月 2023 21:03:34 +0800
Subject: [PATCH] Merge branch 'main' of github.com:alibaba-damo-academy/FunASR into dev_dzh

---
 funasr/runtime/python/grpc/grpc_main_server.py |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/funasr/runtime/python/grpc/grpc_main_server.py b/funasr/runtime/python/grpc/grpc_main_server.py
index e862ac4..ae386fa 100644
--- a/funasr/runtime/python/grpc/grpc_main_server.py
+++ b/funasr/runtime/python/grpc/grpc_main_server.py
@@ -10,7 +10,7 @@
                         # interceptors=(AuthInterceptor('Bearer mysecrettoken'),)
                            )
       paraformer_pb2_grpc.add_ASRServicer_to_server(
-          ASRServicer(args.user_allowed, args.model, args.sample_rate, args.backend, args.onnx_dir), server)
+          ASRServicer(args.user_allowed, args.model, args.sample_rate, args.backend, args.onnx_dir, vad_model=args.vad_model, punc_model=args.punc_model), server)
       port = "[::]:" + str(args.port)
       server.add_insecure_port(port)
       server.start()
@@ -34,7 +34,16 @@
                         type=str,
                         default="damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch",
                         help="model from modelscope")
-                        
+    parser.add_argument("--vad_model",
+                        type=str,
+                        default="damo/speech_fsmn_vad_zh-cn-16k-common-pytorch",
+                        help="model from modelscope")
+    
+    parser.add_argument("--punc_model",
+                        type=str,
+                        default="",
+                        help="model from modelscope")
+    
     parser.add_argument("--sample_rate",
                         type=int,
                         default=16000,
@@ -50,6 +59,7 @@
                         type=str,
                         default="/nfs/models/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch",
                         help="onnx model dir")
+    
                         
 
 

--
Gitblit v1.9.1