From 2fa1522bdd25ed83542ee5a71cc0b022b7a55b10 Mon Sep 17 00:00:00 2001 From: xiongxinlei Date: Sun, 24 Apr 2022 23:10:38 +0800 Subject: [PATCH] update the punc yaml to application.yaml, test=doc --- .../server/bin/paddlespeech_client.py | 5 --- paddlespeech/server/conf/application.yaml | 14 +++++++- paddlespeech/server/conf/punctuation.yaml | 35 ------------------- 3 files changed, 13 insertions(+), 41 deletions(-) delete mode 100644 paddlespeech/server/conf/punctuation.yaml diff --git a/paddlespeech/server/bin/paddlespeech_client.py b/paddlespeech/server/bin/paddlespeech_client.py index 04b3869e1..fe393dd24 100644 --- a/paddlespeech/server/bin/paddlespeech_client.py +++ b/paddlespeech/server/bin/paddlespeech_client.py @@ -385,11 +385,6 @@ class TextClientExecutor(BaseExecutor): default=None, help='sentence to be process by text server.', required=True) - self.parser.add_argument( - '--output', - type=str, - default=None, - help='Return punctuation sentence.') def execute(self, argv: List[str]) -> bool: """Execute the request from the argv. diff --git a/paddlespeech/server/conf/application.yaml b/paddlespeech/server/conf/application.yaml index 849349c2d..06ffccef3 100644 --- a/paddlespeech/server/conf/application.yaml +++ b/paddlespeech/server/conf/application.yaml @@ -11,7 +11,7 @@ port: 8090 # protocol = ['websocket', 'http'] (only one can be selected). # http only support offline engine type. protocol: 'http' -engine_list: ['asr_python', 'tts_python', 'cls_python'] +engine_list: ['asr_python', 'tts_python', 'cls_python', 'text_python'] ################################################################################# @@ -155,3 +155,15 @@ cls_inference: glog_info: False # True -> print glog summary: True # False -> do not show predictor config + +################################### Text ######################################### +################### text task: punc; engine_type: python ####################### +text_python: + task: punc + model_type: 'ernie_linear_p7_wudao' + lang: 'zh' + sample_rate: 16000 + cfg_path: # [optional] + ckpt_path: # [optional] + vocab_file: # [optional] + device: # set 'gpu:id' or 'cpu' \ No newline at end of file diff --git a/paddlespeech/server/conf/punctuation.yaml b/paddlespeech/server/conf/punctuation.yaml deleted file mode 100644 index 268be71f7..000000000 --- a/paddlespeech/server/conf/punctuation.yaml +++ /dev/null @@ -1,35 +0,0 @@ -# This is the parameter configuration file for PaddleSpeech Serving. - -################################################################################# -# SERVER SETTING # -################################################################################# -host: 0.0.0.0 -port: 8190 - -# The task format in the engin_list is: _ -# task choices = ['asr_python', 'asr_inference', 'tts_python', 'tts_inference'] -# protocol = ['websocket', 'http'] (only one can be selected). -# http only support offline engine type. -protocol: 'http' -engine_list: ['text_python'] - - -################################################################################# -# ENGINE CONFIG # -################################################################################# - -################################### ASR ######################################### -################### speech task: asr; engine_type: python ####################### -text_python: - task: punc - model_type: 'ernie_linear_p7_wudao' - lang: 'zh' - sample_rate: 16000 - cfg_path: # [optional] - ckpt_path: # [optional] - vocab_file: # [optional] - device: # set 'gpu:id' or 'cpu' - - - -