FunASR icon indicating copy to clipboard operation
FunASR copied to clipboard

调用FunASR/runtime/http服务出现错误 basic_string::_M_construct null not valid

Open hooploop opened this issue 1 year ago • 10 comments

使用https://github.com/modelscope/FunASR/blob/main/runtime/http/readme_zh.md 这里的文档自行build了一个http服务端,可以正常启动

但curl -F "[email protected]" 127.0.0.1:80调用的时候出现错误 basic_string::_M_construct null not valid

lQLPJwPjvqx_XE3NA4HNBnKwGdOswtiPaJEGQ5uLMxylAA_1650_897

hooploop avatar May 31 '24 01:05 hooploop

meeting the same question ,any one hava an idea of what's wrong?

qiufengyuyi avatar Oct 24 '24 02:10 qiufengyuyi

meeting the same question

Xsx93 avatar Oct 24 '24 03:10 Xsx93

example_runsh.zip 我的环境可以,wav和运行命令见附件。只支持离线模型,wav文件名别有下划线。

/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 80

zhaomingwork avatar Oct 24 '24 05:10 zhaomingwork

https://github.com/user-attachments/assets/2ab28d22-368a-40bc-8626-eb2eb35cd175

zhaomingwork avatar Oct 24 '24 05:10 zhaomingwork

一样的问题,我是直接在funasr-runtime-sdk-cpu-0.4.5镜像中编译的http客户端

hooploop avatar Oct 28 '24 09:10 hooploop

wav文件名别有下划线

删除下划线也不行。

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)

hqlgree2 avatar Oct 30 '24 10:10 hqlgree2

使用https://github.com/modelscope/FunASR/blob/main/runtime/http/readme_zh.md 这里的文档自行build了一个http服务端,可以正常启动

但curl -F "[email protected]" 127.0.0.1:80调用的时候出现错误 basic_string::_M_construct null not valid

lQLPJwPjvqx_XE3NA4HNBnKwGdOswtiPaJEGQ5uLMxylAA_1650_897

meeting the same question. How to solve this problem?

lukeewin avatar Feb 06 '25 15:02 lukeewin

example_runsh.zip 我的环境可以,wav和运行命令见附件。只支持离线模型,wav文件名别有下划线。

/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 80

你好,我也遇到了相同的问题,也是http服务器端能够正常启动,但是通过curl -F命令上传文件进行识别的时候报错terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::substr: __pos (which is 1) > this->size() (which is 140318863265215) 请问这个有什么解决方法吗?

lukeewin avatar Feb 06 '25 15:02 lukeewin

wav文件名别有下划线

删除下划线也不行。

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)

请问你解决了吗?我也遇到了这个报错

lukeewin avatar Feb 06 '25 15:02 lukeewin

你好,我也遇到了相同的问题,也是http服务器端能够正常启动,但是通过curl -F命令上传文件进行识别的时候报错terminate called after throwing an instance of 'std::out_of_range' what(): basic_string::substr: __pos (which is 1) > this->size() (which is 140318863265215) 请问这个有什么解决方法吗?@lukeewin 请问你解决了吗

xuejiale929 avatar Feb 24 '25 10:02 xuejiale929