Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

实时语音识别在online模式下,怎么获取2pass-offline的时间戳 #2396

Open
zskyliang opened this issue Feb 25, 2025 · 0 comments
Labels
question Further information is requested

Comments

@zskyliang
Copy link

部署的cpu镜像:

sudo docker run -p 10097:10095 -it --privileged=true
-v $PWD/funasr-runtime-resources/models:/workspace/models
--name funasr_test
registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.12

配置如下:
nohup bash run_server_2pass.sh
--download-model-dir /workspace/models
--vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx
--model-dir damo/speech_paraformer-large-vad-punc_asr_nat-zh-cn-16k-common-vocab8404-onnx
--online-model-dir damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-online-onnx
--punc-dir damo/punc_ct-transformer_zh-cn-common-vad_realtime-vocab272727-onnx
--lm-dir damo/speech_ngram_lm_zh-cn-ai-wesp-fst
--itn-dir thuduj12/fst_itn_zh
--hotword /workspace/models/hotwords.txt > log.txt 2>&1 &

online模式下推理结果示例:
{'is_final': False, 'mode': '2pass-online', 'text': '请问', 'wav_name': 'default'}
{'is_final': False, 'mode': '2pass-online', 'text': '有什么', 'wav_name': 'default'}
{'is_final': False, 'mode': '2pass-offline', 'text': '请问有什么事', 'wav_name': 'default'}
{'is_final': False, 'mode': '2pass-online', 'text': '呃', 'wav_name': 'default'}
{'is_final': False, 'mode': '2pass-online', 'text': '是不是那', 'wav_name': 'default'}
{'is_final': True, 'mode': '2pass-offline', 'text': '呃,是不是那个的呢个', 'wav_name': 'default'}

我想获取如上所示,每一个'2pass-offline'结果对应的时间戳,应该怎么做呢?

@zskyliang zskyliang added the question Further information is requested label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant