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

Is there a way to extract embeddings for prosody, content and acoustic details? #7

Open
iv41879 opened this issue Sep 12, 2024 · 1 comment

Comments

@iv41879
Copy link

iv41879 commented Sep 12, 2024

@lifeiteng Is there a way to extract embeddings for prosody, content and acoustic details? Thank you

@hmohebbi
Copy link

I tried this (authors may correct me(?)):

with torch.no_grad():
    enc_out = fa_encoder(test_wav)
    vq_post_emb, vq_id, _, quantized, spk_embs = fa_decoder(enc_out, eval_vq=False, vq=True)
    prosody_code = vq_id[:1]
    content_code = vq_id[1:3]
    residual_code = vq_id[3:]
    quantizer = fa_decoder.quantizer.eval()
    prosody_embedding = quantizer[0].vq2emb(prosody_code)
    content_embedding = quantizer[1].vq2emb(content_code)
    residual_embedding = quantizer[2].vq2emb(residual_code)

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