def forward(self, text, view=False):
    with torch.no_grad():
        phones = self.text2phone.string_to_tensor(text).squeeze(0).long().to(torch.device(self.device))
        mel = self.phone2mel(phones, speaker_embedding=self.speaker_embedding).transpose(0, 1)
        wave = self.mel2wav(mel)
    if view:
        (fig, ax) = plt.subplots(nrows=2, ncols=1)
        ax[0].plot(wave.cpu().numpy())
        lbd.specshow(mel.cpu().numpy(), ax=ax[1], sr=16000, cmap='GnBu', y_axis='mel', x_axis='time', hop_length=256)
        ax[0].set_title(self.text2phone.get_phone_string(text))
        ax[0].yaxis.set_visible(False)
        ax[1].yaxis.set_visible(False)
        plt.subplots_adjust(left=0.05, bottom=0.1, right=0.95, top=0.9, wspace=0.0, hspace=0.0)
        plt.show()
    return wave
def forward(self, text, view=False):
    with torch.no_grad():
        phones = self.text2phone.string_to_tensor(text).squeeze(0).long().to(torch.device(self.device))
        mel = self.phone2mel(phones, speaker_embedding=self.speaker_embedding).transpose(0, 1)
        wave = self.mel2wav(mel)
    if view:
        (fig, ax) = plt.subplots(nrows=2, ncols=1)
        ax[0].plot(wave.cpu().numpy())
        lbd.specshow(mel.cpu().numpy(), ax=ax[1], sr=16000, cmap='GnBu', y_axis='mel', x_axis='time', hop_length=256)
        ax[0].set_title(self.text2phone.get_phone_string(text))
        ax[0].yaxis.set_visible(False)
        ax[1].yaxis.set_visible(False)
        plt.subplots_adjust(left=0.05, bottom=0.1, right=0.95, top=0.9, wspace=0.0, hspace=0.0)
        plt.show()
    return wave