baymax / load_models.py
noahabebe's picture
Create load_models.py
c3702c9 verified
raw
history blame contribute delete
522 Bytes
import sys
from pathlib import Path
from synthesizer.inference import Synthesizer
from encoder import inference as encoder
from vocoder import inference as vocoder
project_name = "Real-Time-Voice-Cloning"
sys.path.append(project_name)
# Load the models
encoder.load_model(Path(project_name) / "encoder/saved_models/pretrained.pt")
synthesizer = Synthesizer(Path(project_name) / "synthesizer/saved_models/pretrained/pretrained.pt")
vocoder.load_model(Path(project_name) / "vocoder/saved_models/pretrained/pretrained.pt")