Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diarization - KeyError: 'embed.weight' #21

Closed
RuslanSel opened this issue Jan 6, 2022 · 4 comments
Closed

diarization - KeyError: 'embed.weight' #21

RuslanSel opened this issue Jan 6, 2022 · 4 comments

Comments

@RuslanSel
Copy link

I got the error running python diarization.py --config_path config/infer_est_nspk1.yaml --wav_path 0.wav --model_init WavLM-Large.pt
Traceback (most recent call last):
File "diarization.py", line 321, in
main(args)
File "diarization.py", line 272, in main
model_all_n_speakers = model_parameter_dict["embed.weight"].shape[0]
KeyError: 'embed.weight'

Thanks in advance.

@MarkWuNLP
Copy link
Contributor

Hi, @RuslanSel , @czy97 will answer your question

@czy97
Copy link
Contributor

czy97 commented Jan 10, 2022

I got the error running python diarization.py --config_path config/infer_est_nspk1.yaml --wav_path 0.wav --model_init WavLM-Large.pt Traceback (most recent call last): File "diarization.py", line 321, in main(args) File "diarization.py", line 272, in main model_all_n_speakers = model_parameter_dict["embed.weight"].shape[0] KeyError: 'embed.weight'

Thanks in advance.

Sorry for the late reply. Maybe you downloaded the model from the wrong url. We have saved the pre-trained model and the down-stream diarization model in the same checkpoint file. You should download the model from here: https://drive.google.com/file/d/16OwIyOk2uYm0aWtSPaS0S12xE8RxF7k_/view?usp=sharing, which is referenced in the result Table of https://github.com/microsoft/UniSpeech/tree/main/downstreams/speaker_diarization.

@RuslanSel
Copy link
Author

Yes. I downloaded the model from the main README.md.
Thanks.

@luhuijun666
Copy link

I got the error running python diarization.py --config_path config/infer_est_nspk1.yaml --wav_path 0.wav --model_init WavLM-Large.pt Traceback (most recent call last): File "diarization.py", line 321, in main(args) File "diarization.py", line 272, in main model_all_n_speakers = model_parameter_dict["embed.weight"].shape[0] KeyError: 'embed.weight'
Thanks in advance.

Sorry for the late reply. Maybe you downloaded the model from the wrong url. We have saved the pre-trained model and the down-stream diarization model in the same checkpoint file. You should download the model from here: https://drive.google.com/file/d/16OwIyOk2uYm0aWtSPaS0S12xE8RxF7k_/view?usp=sharing, which is referenced in the result Table of https://github.com/microsoft/UniSpeech/tree/main/downstreams/speaker_diarization.

The url is missing~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants