GPT-SoVITS
GPT-SoVITS copied to clipboard
执行ASR任务时发生missing 1 required positional argument的错误
Traceback (most recent call last):
File "/media/dell/work/workspaces/GPT-SoVITS/tools/damo_asr/cmd-asr.py", line 19, in
输出如上,请问该如何解决?
我把audio_in改成了input,能跑,但我不确定是不是正确办法
改成input会报这个错误:
Traceback (most recent call last):
File "/media/dell/work/workspaces/GPT-SoVITS/tools/damo_asr/cmd-asr.py", line 19, in
你们的modelscope版本是啥,不确定是不是版本原因接口有变化
你们的modelscope版本是啥,不确定是不是版本原因接口有变化
我也在ASR这里遇到了问题,报错
KeyError: 'funasr-pipeline is not in the pipelines registry group auto-speech-recognition. Please make sure the correct version of ModelScope library is used.'
modelscope 1.11.0 funasr 0.8.8
+1
funasr和modelscope都用的git源master分支安装 代码接口audio_in改为input,去掉结尾["text"]就跑起来了,应该是接口问题吧
你们的modelscope版本是啥,不确定是不是版本原因接口有变化
我也在ASR这里遇到了问题,报错
KeyError: 'funasr-pipeline is not in the pipelines registry group auto-speech-recognition. Please make sure the correct version of ModelScope library is used.'
modelscope 1.11.0 funasr 0.8.8
一开始也遇到了, 后来降低了modelscope版本后进入到了下一个错误。降配是通过: git clone https://github.com/modelscope/modelscope.git && cd modelscope pip install -e ./
目前是: Successfully installed modelscope-1.9.4
补充一下,在抛异常之前,有几个warning:
2024-01-17 11:50:08,714 - modelscope - WARNING - No preprocessor field found in cfg. 2024-01-17 11:50:08,714 - modelscope - WARNING - No val key and type key found in preprocessor domain of configuration.json file. 2024-01-17 11:50:08,715 - modelscope - WARNING - Cannot find available config to build preprocessor at mode inference, current config: {'model_dir': 'tools/damo_asr/models/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch'}. trying to build by task and model information. 2024-01-17 11:50:08,715 - modelscope - WARNING - No preprocessor key ('funasr', 'auto-speech-recognition') found in PREPROCESSOR_MAP, skip building preprocessor.
@danvan @Randolph87cb @noob3004 @mullyong 可以参考我 https://github.com/RVC-Boss/GPT-SoVITS/issues/26#issuecomment-1895420620 这里的方法试试
我这正常能用的版本是1.11.0
@danvan @Randolph87cb @noob3004 @mullyong可以参考我#26(评论)这里的方法尝试 结合你的方法并将audio_in改成了input 代码如下: inference_pipeline = pipeline( task=Tasks.auto_speech_recognition, model='damo/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch', vad_model='damo/speech_fsmn_vad_zh-cn-16k-common-pytorch', punc_model='damo/punc_ct-transformer_zh-cn-common-vocab272727-pytorch', )
opt=[] for name in os.listdir(dir): try: text = inference_pipeline(input="%s/%s"%(dir,name))[0]['text'] opt.append("%s/%s|%s|ZH|%s"%(dir,name,opt_name,text)) except: print(traceback.format_exc())
你们的modelscope版本是啥,不确定是不是版本原因接口有变化
我也在ASR这里遇到了问题,报错
KeyError: 'funasr-pipeline is not in the pipelines registry group auto-speech-recognition. Please make sure the correct version of ModelScope library is used.'
modelscope 1.11.0 funasr 0.8.8
遇到了同样的问题,通过降低funasr版本解决了
pip install funasr==0.8.7
pip install modelscope==1.10.0
参考:https://github.com/alibaba-damo-academy/FunASR/issues/1238#issuecomment-1895297780
@danvan @Randolph87cb @noob3004 @mullyong 可以参考我 #26 (comment) 这里的方法试试
你这个方法实际是重新下载到了默认目录,没有找本地路径。不是rootcause,核心应该还是指定pipeline的本地路径。 出这个问题的大家都是linux环境,相对路径下modelscope不认为你找的是一个本地路径的目录。 作者用的可能是windows环境所以不会有问题。
linux环境的用户,这几个地址指定为你本机目录的绝对路径看下。 比如: 我的目录是:/home/disk/xxxx/tools/damo_asr/models/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch 就改为这个地址。
以下是一个例子: inference_pipeline = pipeline( task=Tasks.auto_speech_recognition, model='/home/disk/xxxx/tools/damo_asr/models/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch', vad_model='/home/disk/xxxx/tools/damo_asr/models/speech_fsmn_vad_zh-cn-16k-common-pytorch', punc_model='/home/disk/xxxx/tools/damo_asr/models/punc_ct-transformer_zh-cn-common-vocab272727-pytorch', )
@stormcenter 相对路径和绝对路径我都试过,我是Windows环境。核心原因其实我也没理解。之所以这么搞是因为我发现让它自动下载的 configuration.json
和手动 clone 下来的是不一样的。
然后下边是网站上的
Solution: https://github.com/RVC-Boss/GPT-SoVITS/issues/194#issuecomment-1910205929
Fixed by merging https://github.com/RVC-Boss/GPT-SoVITS/pull/135.