Skip to content

Commit 362dfe6

Browse files
added text_to_sequnce in the hubconf model
1 parent da165c3 commit 362dfe6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hubconf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def nvidia_tacotron2(pretrained=True, **kwargs):
120120

121121
from PyTorch.SpeechSynthesis.Tacotron2.tacotron2 import model as tacotron2
122122
from PyTorch.SpeechSynthesis.Tacotron2.models import lstmcell_to_float, batchnorm_to_float
123+
from PyTorch.SpeechSynthesis.Tacotron2.tacotron2.text import text_to_sequence
123124

124125
fp16 = "model_math" in kwargs and kwargs["model_math"] == "fp16"
125126
force_reload = "force_reload" in kwargs and kwargs["force_reload"]
@@ -163,6 +164,8 @@ def nvidia_tacotron2(pretrained=True, **kwargs):
163164
if pretrained:
164165
m.load_state_dict(state_dict)
165166

167+
m.text_to_sequence = text_to_sequence
168+
166169
return m
167170

168171

0 commit comments

Comments
 (0)