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

AER/FeatureExtraction/DatasetHandling/Recola_46.py does not work #2

Closed
clmpt opened this issue Jun 9, 2021 · 7 comments
Closed

AER/FeatureExtraction/DatasetHandling/Recola_46.py does not work #2

clmpt opened this issue Jun 9, 2021 · 7 comments

Comments

@clmpt
Copy link

clmpt commented Jun 9, 2021

Hi,

I am trying to make the AER scripts work on my computer for the RECOLA dataset.
While I successfully created the environment thanks to the environment.yml file and successfully preprocessed the data with the Preprocess.py script, I have been unable to create the data.json file with the Recola_46.py script.

Indeed, every time I launch the script, I get the following error

Traceback (most recent call last):
  File "./FeatureExtraction/DatasetHandling/Recola_46.py", line 1, in <module>
    from DataClasses import *
ModuleNotFoundError: No module named 'DataClasses'

I reinstalled the dataclasses library, that comes with python since 3.7, but it did not change the error.

I also removed caps from the import (from dataclasses import * instead of from DataClasses import *) but I got this error

Traceback (most recent call last):
  File "./FeatureExtraction/DatasetHandling/Recola_46.py", line 66, in <module>
    main()
  File "./FeatureExtraction/DatasetHandling/Recola_46.py", line 22, in main
    fileDict = AudioSample()
NameError: name 'AudioSample' is not defined

Thus, I believe that you are using a custom module named DataClasses.py, called by the line below, and that is not present in the repository.

Could you please confirm this and if possible provide the corresponding file ?

@SinaAlisamir
Copy link
Collaborator

Hello, yes, it is my bad, sorry, I uploaded the DataClasses file under "DatasetHandling", please let me know if that resolves the issue or any other issue you might encounter

@clmpt
Copy link
Author

clmpt commented Jun 10, 2021

Thank you !
This resolved the issue.

However, when extracting wav2vec2 features, I get the following error:

Traceback (most recent call last):
  File "FeatureExtraction/wav2vec2.py", line 8, in <module>
    from featFuncs import loadFromJson
ModuleNotFoundError: No module named 'featFuncs'

I guess, that is also caused by a missing file.
Could you please upload it ?

PS: I did not create a new issue for that since it seems related.

@SinaAlisamir
Copy link
Collaborator

The file is now uploaded,
Also, many thanks for reporting the issues.

@clmpt
Copy link
Author

clmpt commented Jun 11, 2021

Thanks again for solving the issue.

I have one last question, that is not related to these issues.
I want to use the LeBenchmark model on RECOLA.
I can see the model is on HuggingFace, but I do not see how I can use it natively, as the wav2vec2.pyscript is made to work with fairseqonly.
Am I missing something ?

@SinaAlisamir
Copy link
Collaborator

np.

Yes, it is true that it is done through fairseq and honestly, I do not know how HuggingFace ecosystem works so I can not really answer how you can use LeBenchmark models with that, sorry about that, ... maybe if you provide more information on what you want to do exactly I could be able to help you,

About wav2vec2.py script and RECOLA, it allows for chunking wav files before extracting features for memory issues since RECOLA files are 5 minutes each and it is recommend for wa2vec models to be split into 10 to 30 seconds in length. Otherwise the same underlying pytorch model is used so technically it should be possible to use it on any ecosystem built on top of pytorch.

@clmpt
Copy link
Author

clmpt commented Jun 11, 2021

OK. Thank you for your time and help 🙂.

I will try getting more into HuggingFace to make it work with LeBenchmark.
If I cannot find a way, I will try to contact you.

Thanks again,
Clément

@SinaAlisamir
Copy link
Collaborator

Any time and good luck :)

@clmpt clmpt closed this as completed Jun 16, 2021
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