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

Using Wav2Vec2 model #5

Open
evelynlee999 opened this issue Oct 31, 2022 · 0 comments
Open

Using Wav2Vec2 model #5

evelynlee999 opened this issue Oct 31, 2022 · 0 comments

Comments

@evelynlee999
Copy link

evelynlee999 commented Oct 31, 2022

Thanks for your code,it helped me a lot,but I tried to use Wav2Vec2 model and got error as following:
RuntimeError: Expected 2D (unbatched) or 3D (batched) input to conv1d, but got input of size: [32, 1, 301, 40]
It showed the error at output.
`def wav2vec2_embed_raw_audio(input_tensor: t.Tensor, model: Wav2Vec2Model) -> t.Tensor:

output: Wav2Vec2BaseModelOutput = model(input_tensor)

features = output.last_hidden_state
features = features.transpose(1, 2)

return features`

Should I transform t.Tensor into the path of voxceleb or it should be t.tensor.

And I have another problem,download_pretrained_models.sh downloaded some .pt files,but it seemed to be useless,and I don't know where to use them.

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

1 participant