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

Real Time Voice Cloning - Pretrained model not found. #51

Closed
AronYstad opened this issue Jan 10, 2022 · 2 comments
Closed

Real Time Voice Cloning - Pretrained model not found. #51

AronYstad opened this issue Jan 10, 2022 · 2 comments

Comments

@AronYstad
Copy link

When I tried to run the notebook for Real Time Voice Cloning, it gave me this error:

--2022-01-10 20:13:16-- https://github.com/blue-fish/Real-Time-Voice-Cloning/releases/download/v1.0/pretrained.zip
Resolving github.com (github.com)... 140.82.113.3
Connecting to github.com (github.com)|140.82.113.3|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-01-10 20:13:17 ERROR 404: Not Found.


FileNotFoundError Traceback (most recent call last)
in ()
36 from pathlib import Path
37
---> 38 encoder.load_model(project_name / Path("encoder/saved_models/pretrained.pt"))
39 synthesizer = Synthesizer(project_name / Path("synthesizer/saved_models/pretrained/pretrained.pt"))
40 vocoder.load_model(project_name / Path("vocoder/saved_models/pretrained/pretrained.pt"))

/content/Real-Time-Voice-Cloning/encoder/inference.py in load_model(weights_fpath, device)
30 _device = torch.device(device)
31 _model = SpeakerEncoder(_device, torch.device("cpu"))
---> 32 checkpoint = torch.load(weights_fpath, _device)
33 _model.load_state_dict(checkpoint["model_state"])
34 _model.eval()

/usr/local/lib/python3.7/dist-packages/torch/serialization.py in load(f, map_location, pickle_module, **pickle_load_args)
592 pickle_load_args['encoding'] = 'utf-8'
593
--> 594 with _open_file_like(f, 'rb') as opened_file:
595 if _is_zipfile(opened_file):
596 # The zipfile reader is going to advance the current file position.

/usr/local/lib/python3.7/dist-packages/torch/serialization.py in _open_file_like(name_or_buffer, mode)
228 def _open_file_like(name_or_buffer, mode):
229 if _is_path(name_or_buffer):
--> 230 return _open_file(name_or_buffer, mode)
231 else:
232 if 'w' in mode:

/usr/local/lib/python3.7/dist-packages/torch/serialization.py in init(self, name, mode)
209 class _open_file(_opener):
210 def init(self, name, mode):
--> 211 super(_open_file, self).init(open(name, mode))
212
213 def exit(self, *args):

FileNotFoundError: [Errno 2] No such file or directory: 'Real-Time-Voice-Cloning/encoder/saved_models/pretrained.pt'

I am assuming this is because the pretrained model is no longer up. So I am assuming the fix would just be to change the link to the pretrained model.

@sadiesocio
Copy link

sadiesocio commented Jan 12, 2022

That is correct. I went ahead and uploaded the pretrained models to archive.org
you can access them here: https://archive.org/download/pretrained/pretrained.zip

If you would like an updated/working notebook:
https://colab.research.google.com/github/sadiesocio/RealTimeVoiceCloning/blob/main/RealTimeVoiceCloning.ipynb

@tugstugi
Copy link
Owner

it is now fixed by 2eb5183

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