TencentGameMate / chinese_speech_pretrain

chinese speech pretrained models
997 stars 84 forks source link

关于模型中没有task_cfg、model_cfg、model_weight、dictionaries_symbols这一问题,求大佬解答 #18

Open 646312715 opened 2 years ago

646312715 commented 2 years ago

大佬您好,很高兴我能看到大佬开源的中文hubert预训练模型,在我看来该开源的模型非常具有学习价值。由于比较缺乏语音识别训练的经验,在我使用大佬给出的espnet文件夹中的配置文件和chinese-hubert-base.pt进行微调尝试时,卡在了asr.sh文件的stage 10的部分。

具体问题是在convert.py文件中报错: File "/home/oem/workspace/s3prl-master/s3prl/upstream/hubert/convert.py", line 47, in load_converted_model raise ValueError( ValueError: /home/oem/workspace/hubert-base/espnet-master/egs2/aishell/asr1/checkpoint_best.pt is not a valid checkpoint since the required key: task_cfg is missing

而我自己查看了一下:chinese-hubert-base.pt模型中并没有task_cfg、model_cfg、model_weight、dictionaries_symbols这些关键词,导致了convert.py文件的报错。 因此猜想,是否是train_asr_conformer_hubert-base.yaml配置文件中的upstream_model_config没有进行书写导致的。还是说为还有其他没有注意到的点呢? 如果大佬能看到,真心希望能得到您的解答,期待得到您的回复。

wangyiav commented 1 year ago

发现相同问题,求指点。感谢!

646312715 commented 1 year ago

espnet中每个例子都有它自己的asr.sh,而github中的asr.sh就在espnet/egs2/aishell/asr1/里。

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2022年11月14日(星期一) 下午5:44 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [TencentGameMate/chinese_speech_pretrain] 关于模型中没有task_cfg、model_cfg、model_weight、dictionaries_symbols这一问题,求大佬解答 (Issue #18)

请问,asr.sh是在哪里有呀

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

rookie0607 commented 1 year ago

大佬好,很我能看到大佬开源的的预训练预训练预训练,在预训练预训练,在我看来看来该开源模型模型具有具有学习学习价值。由于由于比较比较缺乏缺乏espnet文件夹中的配置文件和chinese-hubert-base.pt进行微调尝试时,卡在了asr.sh文件的stage 10的部分。

具体问题是在convert.py文件中报错: File "/home/oem/workspace/s3prl-master/s3prl/upstream/hubert/convert.py", line 47, in load_converted_model raise ValueError( ValueError: /home/oem/ workspace/hubert-base/espnet-master/egs2/aishell/asr1/checkpoint_best.pt 不是有效的检查点,因为缺少所需的密钥:task_cfg

而我查看:central-hubert-base.pt模型中没有没有没有没有没有没有没有没有没有没有没有,,,,型型型型型diction_weight dictionaries_symbols 这些中的upstream_model_config没有进行书写致的。还是说还有其他没有注意的点呢? 如果大佬能看到,真心希望能得到您的解答,期待得到您的回复。

我遇到了同样的问题,请问您解决了吗?如果解决了,解决办法能否告知一下。谢谢。

rookie0607 commented 1 year ago

我遇到了同样的问题,请问您解决了吗?如果解决了,解决办法能否告知一下。谢谢。

我遇到了同样的问题,请问您解决了吗?如果解决了,解决办法能否告知一下。谢谢。

646312715 commented 1 year ago

抱歉,现在才留意到你的消息,我的解决方法是对fairseq的版本进行升级即可。 我也是个萌新,如果想互相讨论的话,可以加一下我的qq。

------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年1月9日(星期一) 下午5:39 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [TencentGameMate/chinese_speech_pretrain] 关于模型中没有task_cfg、model_cfg、model_weight、dictionaries_symbols这一问题,求大佬解答 (Issue #18)

我遇到了同样的问题,请问您解决了吗?如果解决了,解决办法能否告知一下。谢谢。

我遇到了同样的问题,请问您解决了吗?如果解决了,解决办法能否告知一下。谢谢。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

rookie0607 commented 1 year ago

抱歉,现在才留意到你的消息,我的解决方法是对fairseq的版本进行升级即可。 我也是个萌新,如果想互相讨论的话,可以加一下我的qq。 ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年1月9日(星期一) 下午5:39 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [TencentGameMate/chinese_speech_pretrain] 关于模型中没有task_cfg、model_cfg、model_weight、dictionaries_symbols这一问题,求大佬解答 (Issue #18) 我遇到了同样的问题,请问您解决了吗?如果解决了,解决办法能否告知一下。谢谢。 我遇到了同样的问题,请问您解决了吗?如果解决了,解决办法能否告知一下。谢谢。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

麻烦留一下qq吧

rookie0607 commented 1 year ago

646312715 ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年1月13日(星期五) 中午1:43 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [TencentGameMate/chinese_speech_pretrain] 关于模型中没有task_cfg、model_cfg、model_weight、dictionaries_symbols这一问题,求大佬解答 (Issue #18) 抱歉,现在才留意到你的消息,我的解决方法是对fairseq的版本进行升级即可。 我也是个萌新,如果想互相讨论的话,可以加一下我的qq。 … ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年1月9日(星期一) 下午5:39 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [TencentGameMate/chinese_speech_pretrain] 关于模型中没有task_cfg、model_cfg、model_weight、dictionaries_symbols这一问题,求大佬解答 (Issue #18) 我遇到了同样的问题,请问您解决了吗?如果解决了,解决办法能否告知一下。谢谢。 我遇到了同样的问题,请问您解决了吗?如果解决了,解决办法能否告知一下。谢谢。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.> 麻烦留一下qq吧 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.>

646312715 ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年1月13日(星期五) 中午1:43 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [TencentGameMate/chinese_speech_pretrain] 关于模型中没有task_cfg、model_cfg、model_weight、dictionaries_symbols这一问题,求大佬解答 (Issue #18) 抱歉,现在才留意到你的消息,我的解决方法是对fairseq的版本进行升级即可。 我也是个萌新,如果想互相讨论的话,可以加一下我的qq。 … ------------------ 原始邮件 ------------------ 发件人: @.>; 发送时间: 2023年1月9日(星期一) 下午5:39 收件人: @.>; 抄送: @.>; @.>; 主题: Re: [TencentGameMate/chinese_speech_pretrain] 关于模型中没有task_cfg、model_cfg、model_weight、dictionaries_symbols这一问题,求大佬解答 (Issue #18) 我遇到了同样的问题,请问您解决了吗?如果解决了,解决办法能否告知一下。谢谢。 我遇到了同样的问题,请问您解决了吗?如果解决了,解决办法能否告知一下。谢谢。 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.> 麻烦留一下qq吧 — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.>

已添加,多谢。

paopaoayaya commented 1 year ago

我遇到了同样的问题,请问您解决了吗?如果解决了,解决办法能否告知一下。谢谢。

LiuShixing commented 1 year ago

有两种格式的文件,你看一下下载的是哪个

发自我的iPhone

------------------ 原始邮件 ------------------ 发件人: paopaoayaya @.> 发送时间: 2023年5月1日 13:10 收件人: TencentGameMate/chinese_speech_pretrain @.> 抄送: Subscribed @.***> 主题: Re: [TencentGameMate/chinese_speech_pretrain] 关于模型中没有task_cfg、model_cfg、model_weight、dictionaries_symbols这一问题,求大佬解答 (Issue #18)

我遇到了同样的问题,请问您解决了吗?如果解决了,解决办法能否告知一下。谢谢。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

cnSherry commented 1 year ago

SSMX9U(4WM}4B}AF8R38VZE

应该是Fairseq预训练保存的checkpoint中字段与convert.py中查找的字段不匹配,如图划线部分修改就能跑通了。

zyjcsf commented 9 months ago

在conf文件里添加extra_conf: fairseq: True 可以解决这个问题,调用load_and_convert_fairseq_ckpt而不是load_converted_model