Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

synthesize --model="Tacotron" --mode="live" fix #237

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tacotron/feeder.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, coordinator, metadata_filename, hparams):
train_indices, test_indices = train_test_split(indices,
test_size=test_size, random_state=hparams.tacotron_data_random_state)

#Make sure test_indices is a multiple of batch_size else round up
#Make sure test_indices is a multiple of batch_size else round down
len_test_indices = self._round_down(len(test_indices), hparams.tacotron_batch_size)
extra_test = test_indices[len_test_indices:]
test_indices = test_indices[:len_test_indices]
Expand Down
2 changes: 1 addition & 1 deletion tacotron/synthesize.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


def generate_fast(model, text):
model.synthesize(text, None, None, None, None)
model.synthesize([text], None, None, None, None)


def run_live(args, checkpoint_path, hparams):
Expand Down
2 changes: 1 addition & 1 deletion tacotron/synthesizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def synthesize(self, texts, basenames, out_dir, log_dir, mel_filenames):

if basenames is None:
#Generate wav and read it
wav = audio.inv_mel_spectrogram(mels.T, hparams)
wav = audio.inv_mel_spectrogram(mels[0].T, hparams)
audio.save_wav(wav, 'temp.wav', sr=hparams.sample_rate) #Find a better way

chunk = 512
Expand Down