离线识别http服务funasr-http-server收到POST请求时崩溃
funasr-http-server收到请求时崩溃,该问题必现,使用curl发送请求,curl -F '[email protected]' 127.0.0.1:10099
🐛 Bug
运行funasr-http-server,按照文档所提供的请求方式 curl -F '[email protected]' 127.0.0.1:10099,服务崩溃,提示如下:
似乎是在解析POST内容的时候崩溃了
@zhaomingwork Please check it
funasr-http-server收到请求时崩溃,该问题必现,使用curl发送请求,curl -F '[email protected]' 127.0.0.1:10099🐛 Bug
运行funasr-http-server,按照文档所提供的请求方式 curl -F '[email protected]' 127.0.0.1:10099,服务崩溃,提示如下:
![]()
似乎是在解析POST内容的时候崩溃了
什么操作系统?等我空了复现下
ubuntu 22.04
我这是正常的,如图server和 client的运行结果
I got the same error. There must be something wrong here. Can you directly expose a docker image of HTTP version ?
If I compile the http version of the source code directly in the container of the image funasr-runtime-sdk-online-cpu-0.1.10, it always gets another error when accepting a POST request. But the websocket version of offline asr works fine.
我的启动命令,先别加载itn或lm之类试试。 ./funasr-http-server --vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx --model-dir damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx --punc-dir damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx --itn-dir '' --lm-dir '' --port 10001
我的启动命令,先别加载itn或lm之类试试。 ./funasr-http-server --vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx --model-dir damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx --punc-dir damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx --itn-dir '' --lm-dir '' --port 10001
我已经试过了,按照你的命令和模型,在windows的wsl2中还是会抛出out of range错误。而在funasr-runtime-sdk-online-cpu-0.1.10的容器里重新编译然后按你的命令别加载itn或lm,会抛出logic_error错误。
Ubuntu20.04系统试试,windows下没试过
---原始邮件--- 发件人: @.> 发送时间: 2024年8月4日(周日) 中午11:25 收件人: @.>; 抄送: @.@.>; 主题: Re: [modelscope/FunASR] 离线识别http服务funasr-http-server收到POST请求时崩溃 (Issue #1943)
我的启动命令,先别加载itn或lm之类试试。 ./funasr-http-server --vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx --model-dir damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx --punc-dir damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx --itn-dir '' --lm-dir '' --port 10001
我已经试过了,按照你的命令和模型,在windows的wsl2中还是会抛出out of range错误。而在funasr-runtime-sdk-online-cpu-0.1.10的容器里重新编译然后按你的命令别加载itn或lm,会抛出logic_error错误。 image.png (view on web)
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
我租了一台8核16G的腾讯云ubuntu20.04,按照文档编译然后运行,文件识别到一般就会抛出bad_weak_ptr的错误
Ubuntu20.04系统试试,windows下没试过 … ---原始邮件--- 发件人: @.> 发送时间: 2024年8月4日(周日) 中午11:25 收件人: @.>; 抄送: @.@.>; 主题: Re: [modelscope/FunASR] 离线识别http服务funasr-http-server收到POST请求时崩溃 (Issue #1943) 我的启动命令,先别加载itn或lm之类试试。 ./funasr-http-server --vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx --model-dir damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx --punc-dir damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx --itn-dir '' --lm-dir '' --port 10001 我已经试过了,按照你的命令和模型,在windows的wsl2中还是会抛出out of range错误。而在funasr-runtime-sdk-online-cpu-0.1.10的容器里重新编译然后按你的命令别加载itn或lm,会抛出logic_error错误。 image.png (view on web) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
我租了一台8核16g的ubuntu20.04按照文档编译http服务端,服务端再接收到post请求后识别到一半就会抛出bad_weak_ptr错误
我这边是正常的,无法复现你的情况。不过源码都有,你可以自己试试dbg跟踪下原因
---原始邮件--- 发件人: @.> 发送时间: 2024年8月4日(周日) 中午12:30 收件人: @.>; 抄送: @.@.>; 主题: Re: [modelscope/FunASR] 离线识别http服务funasr-http-server收到POST请求时崩溃 (Issue #1943)
我租了一台8核16G的腾讯云ubuntu20.04,按照文档编译然后运行,文件识别到一般就会抛出bad_weak_ptr的错误
Ubuntu20.04系统试试,windows下没试过 … ---原始邮件--- 发件人: @.> 发送时间: 2024年8月4日(周日) 中午11:25 收件人: @.>; 抄送: @.@.>; 主题: Re: [modelscope/FunASR] 离线识别http服务funasr-http-server收到POST请求时崩溃 (Issue #1943) 我的启动命令,先别加载itn或lm之类试试。 ./funasr-http-server --vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx --model-dir damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx --punc-dir damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx --itn-dir '' --lm-dir '' --port 10001 我已经试过了,按照你的命令和模型,在windows的wsl2中还是会抛出out of range错误。而在funasr-runtime-sdk-online-cpu-0.1.10的容器里重新编译然后按你的命令别加载itn或lm,会抛出logic_error错误。 image.png (view on web) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
我租了一台8核16g的ubuntu20.04按照文档编译http服务端,服务端再接收到post请求后识别到一半就会抛出bad_weak_ptr错误 image.png (view on web)
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
docker镜像 registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-0.4.5 容器内怎么没有funasr-http-server 脚本啊?只有run_server.sh 和 run_server_2pass.sh
没有就自己编译一个
---原始邮件--- 发件人: @.> 发送时间: 2024年8月8日(周四) 上午10:55 收件人: @.>; 抄送: @.@.>; 主题: Re: [modelscope/FunASR] 离线识别http服务funasr-http-server收到POST请求时崩溃 (Issue #1943)
docker镜像 registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-cpu-0.4.5 容器内怎么没有funasr-http-server 脚本啊?只有run_server.sh 和 run_server_2pass.sh
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>
build funasr-http-server from source on
#############################################################
# OS: ubuntu 20.04.6 focal
# Kernel: x86_64 Linux 5.4.0-193-generic
# CPU: Intel(R) Xeon(R) CPU E5-2680 v4 @ 2.40GHz
# CPU NUM: 4
# RAM: 8136092 kB
#
# Version: 0.0.8
# Modify Date: 20231030
#############################################################
when run this command
curl -F "file=@asr_example.wav" 127.0.0.1:10096
server log
http post only support offline mode, if you want online mode, pls try websocket!
now succeed listen on port 0.0.0.0:10096, can accept data now!!!
**hotwords: set wav_format=pcm, file_name=asr_example.wav
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_M_construct null not valid
Aborted (core dumped)**
我租了一台8核16G的腾讯云ubuntu20.04,按照文档编译然后运行,文件识别到一般就会抛出bad_weak_ptr的错误
Ubuntu20.04系统试试,windows下没试过 … ---原始邮件--- 发件人: @.> 发送时间: 2024年8月4日(周日) 中午11:25 收件人: _@**._>; 抄送: _@.@._>; 主题: Re: [modelscope/FunASR] 离线识别http服务funasr-http-server收到POST请求时崩溃 (Issue #1943) 我的启动命令,先别加载itn或lm之类试试。 ./funasr-http-server --vad-dir damo/speech_fsmn_vad_zh-cn-16k-common-onnx --model-dir damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-onnx --punc-dir damo/punc_ct-transformer_cn-en-common-vocab471067-large-onnx --itn-dir '' --lm-dir '' --port 10001 我已经试过了,按照你的命令和模型,在windows的wsl2中还是会抛出out of range错误。而在funasr-runtime-sdk-online-cpu-0.1.10的容器里重新编译然后按你的命令别加载itn或lm,会抛出logic_error错误。 image.png (view on web) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: _@_.*>
我租了一台8核16g的ubuntu20.04按照文档编译http服务端,服务端再接收到post请求后识别到一半就会抛出bad_weak_ptr错误
请问你解决了吗?我也遇到了相同的问题,在Ubuntu22.04系统中
Ubuntu20.04系统试试,windows下没试过 …
我在Ubuntu22.04系统中测试,发现也是报这个错误,报错信息如下: I20250206 23:29:02.830818 4369 ct-transformer.cpp:21] Successfully load model from /root/autodl-tmp/models/punc_ct-transformer_zh-cn-common-vocab272727-onnx/model_quant.onnx I20250206 23:29:03.134003 4369 model-decoder.cpp:110] model successfully inited I20250206 23:29:03.134043 4369 server.cpp:37] try to listen on port:80 I20250206 23:29:03.134055 4369 server.cpp:38] still not work, pls wait... I20250206 23:29:03.134059 4369 server.cpp:39] if always waiting here, may be port in used, pls change the port or kill pre-process! use curl to test,just as curl -F "[email protected]" 127.0.0.1:80 http post only support offline mode, if you want online mode, pls try websocket! now succeed listen on port 0.0.0.0:80, can accept data now!!! hotwords: set wav_format=pcm, file_name=test2.wav terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::substr: __pos (which is 1) > this->size() (which is 140318863265215) Aborted (core dumped) 请问这个如何解决?
感觉c++的websocket版本(wss)比较稳定,但是http并没有编译打包到镜像中,是不是用wss会更好些? 我们实践中是用wss版,然后自己做一个http层(fastapi)跟wss互联互通架上去,也挺稳的。
如果真要扣细节,上面楼也说了,需要自己gdb一下,估计是哪个数组没保护到位,非法访问引起core dump了
感觉c++的websocket版本(wss)比较稳定,但是http并没有编译打包到镜像中,是不是用wss会更好些? 我们实践中是用wss版,然后自己做一个http层(fastapi)跟wss互联互通架上去,也挺稳的。
如果真要扣细节,上面楼也说了,需要自己gdb一下,估计是哪个数组没保护到位,非法访问引起core dump了
我实际需求 需要http,找了很多教程 不知道怎么改成http去调用
感觉c++的websocket版本(wss)比较稳定,但是http并没有编译打包到镜像中,是不是用wss会更好些? 我们实践中是用wss版,然后自己做一个http层(fastapi)跟wss互联互通架上去,也挺稳的。 如果真要扣细节,上面楼也说了,需要自己gdb一下,估计是哪个数组没保护到位,非法访问引起core dump了
我实际需求 需要http,找了很多教程 不知道怎么改成http去调用
用fastapi实现一层http服务就好了,这个直接问一下大模型(豆包,通义),再结合一些资料,应该比较快可以做出来的。
see PR #2509
see PR #2509
我在WSL2使用,一开始http的代码能成功编译,但运行测试时,也是报错“terminate called after throwing an instance of 'std::out_of_range'”。然后看到这个issue后,更新到了最新的代码,跟之前一样的命令但是编译都无法通过,报的错基本都是“redefinition”相关的,like: /usr/include/boost/asio/execution/set_done.hpp:200:8: error: redefinition of default argument for ‘class T’ error: redefinition of ‘const T asio_execution_set_done_fn::static_instance<T>::instance’ error: ‘template<class T, class E, class> struct boost::asio::traits::set_error_free’ conflicts with a previous declaration 所以麻烦请教一下,可能是哪里的问题,应该如何修改呢?

