| | |
| | | # ONNXRuntime-cpp for Websocket Server
|
| | | # Service with websocket-cpp
|
| | |
|
| | | ## Export the model
|
| | | ### Install [modelscope and funasr](https://github.com/alibaba-damo-academy/FunASR#installation)
|
| | |
| | | If use vad, please add: [--vad-config <string>] [--vad-cmvn <string>] [--vad-model <string>]
|
| | | If use punc, please add: [--punc-config <string>] [--punc-model <string>]
|
| | | example:
|
| | | ./bin/websocketmain --am-config /FunASR/funasr/runtime/onnxruntime/export/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/config.yaml --am-model /FunASR/funasr/runtime/onnxruntime/export/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/model.onnx --am-cmvn /FunASR/funasr/runtime/onnxruntime/export/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/am.mvn
|
| | | websocketmain --am-config /FunASR/funasr/runtime/onnxruntime/export/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/config.yaml --am-model /FunASR/funasr/runtime/onnxruntime/export/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/model.onnx --am-cmvn /FunASR/funasr/runtime/onnxruntime/export/damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch/am.mvn
|
| | | ```
|
| | |
|
| | | ## Run websocket client test
|
| | |
|
| | | ```shell
|
| | | Usage: websocketclient server_ip port wav_path threads_num
|
| | |
|
| | | example:
|
| | |
|
| | | websocketclient 127.0.0.1 8889 funasr/runtime/websocket/test.pcm.wav 64
|
| | |
|
| | | result json, example like:
|
| | | {"text":"一二三四五六七八九十一二三四五六七八九十"}
|
| | | ```
|
| | |
|