File size: 520 Bytes
d1b91e7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from inference.tts.fs import FastSpeechInfer
from modules.tts.fs2_orig import FastSpeech2Orig
from utils.commons.ckpt_utils import load_ckpt
from utils.commons.hparams import hparams


class FastSpeech2OrigInfer(FastSpeechInfer):
    def build_model(self):
        dict_size = len(self.ph_encoder)
        model = FastSpeech2Orig(dict_size, self.hparams)
        model.eval()
        load_ckpt(model, hparams['work_dir'], 'model')
        return model


if __name__ == '__main__':
    FastSpeech2OrigInfer.example_run()