use phoneme to sequence for synthesis

pull/10/head
Eren Golge 2019-01-01 20:09:34 +01:00
parent 547a762b67
commit 5f22e2a83a
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@ import time
import librosa
import torch
import numpy as np
from .text import text_to_sequence
from .text import text_to_sequence, phoneme_to_sequence
from .visual import visualize
from matplotlib import pylab as plt
@ -11,7 +11,7 @@ from matplotlib import pylab as plt
def synthesis(m, s, CONFIG, use_cuda, ap):
""" Given the text, synthesising the audio """
text_cleaner = [CONFIG.text_cleaner]
seq = np.array(text_to_sequence(s, text_cleaner))
seq = np.array(phoneme_to_sequence(s, text_cleaner))
chars_var = torch.from_numpy(seq).unsqueeze(0)
if use_cuda:
chars_var = chars_var.cuda()