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

请问一下,新增语音情感,StyleEncoder 模型需要重训练吗?怎么训练这个模型呢? #142

Open
wildBigPanda opened this issue Mar 22, 2024 · 2 comments

Comments

@wildBigPanda
Copy link

我看代码模型里面语音情感的维度写死了,目前只有 【普通 生气 开心 惊讶 悲伤 厌恶 恐惧】 这7个维度, 比如要增加 撒娇 ,要怎么改呢?

@syq163
Copy link
Collaborator

syq163 commented Mar 26, 2024

Which specific code are you referring to?

@wildBigPanda
Copy link
Author

wildBigPanda commented Mar 26, 2024

style_encoder = StyleEncoder(config)
model_CKPT = torch.load(config.style_encoder_ckpt, map_location="cpu")
model_ckpt = {}
for key, value in model_CKPT['model'].items():
    new_key = key[7:]
    model_ckpt[new_key] = value
style_encoder.load_state_dict(model_ckpt, strict=False)

这段代码,key=‘emotion_clf.classifier.bias’ 和key = ‘emotion_clf.classifier.weight’ ,只有7个维度的情感类型

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

2 participants