fix the unuseful code, test=doc

pull/1704/head
xiongxinlei 3 years ago
parent 9c03280ca6
commit ff4ddd229e

@ -181,7 +181,6 @@ class CTCDecoder(CTCDecoderBase):
if self._ext_scorer is not None: if self._ext_scorer is not None:
return return
from paddlespeech.s2t.decoders.ctcdecoder import Scorer # noqa: F401
if language_model_path != '': if language_model_path != '':
logger.info("begin to initialize the external scorer " logger.info("begin to initialize the external scorer "
"for decoding") "for decoding")

@ -45,11 +45,3 @@ asr_online:
shift_n: 4 # frame shift_n: 4 # frame
window_ms: 20 # ms window_ms: 20 # ms
shift_ms: 10 # ms shift_ms: 10 # ms
vad_conf:
aggressiveness: 2
sample_rate: 16000
frame_duration_ms: 20
sample_width: 2
padding_ms: 200
padding_ratio: 0.9

@ -21,7 +21,7 @@ engine_list: ['asr_online']
################################### ASR ######################################### ################################### ASR #########################################
################### speech task: asr; engine_type: online ####################### ################### speech task: asr; engine_type: online #######################
asr_online: asr_online:
model_type: 'conformer_online_multi-cn' model_type: 'conformer_online_multicn'
am_model: # the pdmodel file of am static model [optional] am_model: # the pdmodel file of am static model [optional]
am_params: # the pdiparams file of am static model [optional] am_params: # the pdiparams file of am static model [optional]
lang: 'zh' lang: 'zh'

@ -59,7 +59,7 @@ pretrained_models = {
'lm_md5': 'lm_md5':
'29e02312deb2e59b3c8686c7966d4fe3' '29e02312deb2e59b3c8686c7966d4fe3'
}, },
"conformer_online_multi-cn-zh-16k": { "conformer_online_multicn-zh-16k": {
'url': 'url':
'https://paddlespeech.bj.bcebos.com/s2t/multi_cn/asr1/asr1_chunk_conformer_multi_cn_ckpt_0.2.3.model.tar.gz', 'https://paddlespeech.bj.bcebos.com/s2t/multi_cn/asr1/asr1_chunk_conformer_multi_cn_ckpt_0.2.3.model.tar.gz',
'md5': 'md5':

@ -28,7 +28,6 @@ router = APIRouter()
@router.websocket('/ws/asr') @router.websocket('/ws/asr')
async def websocket_endpoint(websocket: WebSocket): async def websocket_endpoint(websocket: WebSocket):
print("websocket protocal receive the dataset")
await websocket.accept() await websocket.accept()
engine_pool = get_engine_pool() engine_pool = get_engine_pool()

Loading…
Cancel
Save