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

emotion_encoder_path #9

Open
ZahraGhasemi-AI opened this issue Jan 21, 2023 · 3 comments
Open

emotion_encoder_path #9

ZahraGhasemi-AI opened this issue Jan 21, 2023 · 3 comments

Comments

@ZahraGhasemi-AI
Copy link

I'm trying to run Inference towards style transfer of custom voice in colab. I got this error:

Traceback (most recent call last):
File "GenerSpeech.py", line 35, in
GenerSpeechInfer.example_run()
File "/content/drive/MyDrive/TTS/colab/GenerSpeech/GenerSpeech/inference/base_tts_infer.py", line 170, in example_run
out = infer_ins.infer_once(inp)
File "/content/drive/MyDrive/TTS/colab/GenerSpeech/GenerSpeech/inference/base_tts_infer.py", line 153, in infer_once
inp = self.preprocess_input(inp)
File "/content/drive/MyDrive/TTS/colab/GenerSpeech/GenerSpeech/inference/base_tts_infer.py", line 82, in preprocess_input
EmotionEncoder.load_model(self.hparams['emotion_encoder_path'])
File "/content/drive/MyDrive/TTS/colab/GenerSpeech/GenerSpeech/data_gen/tts/emotion/inference.py", line 33, in load_model
checkpoint = torch.load(weights_fpath)
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 771, in load
with _open_file_like(f, 'rb') as opened_file:
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 270, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 251, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: '/home1/huangrongjie/Project/Emotion_encoder/1121_emotion_encoder.pt'

I put emotion encoder in 'checkpoints/Emotion_encoder.pt', as you said in readme.

@Rongjiehuang
Copy link
Owner

Hi, it's an issue caused by the incorrect path for the pre-trained model, you may set emotion_encoder_path in hparams.

@ZahraGhasemi-AI
Copy link
Author

Hi, you must change emotion_encoder_path to checkpoints/Emotion_encoder.pt .
It is wrong in config.yaml from generspeech pretrained models that you provided, line73....

@qingju-flwls
Copy link

Hi, the provided emotion encoder is not based on wav2vec, Is there any plan to release the pretrained emotion&speaker encoder from the base wav2vec model? Thank you.

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

3 participants