mirror of https://github.com/coqui-ai/TTS.git
Merge branch 'larger-attn-larger-model'
This commit is contained in:
commit
41c06029b8
|
@ -37,8 +37,8 @@ class LocationSensitiveAttention(nn.Module):
|
||||||
annot_dim,
|
annot_dim,
|
||||||
query_dim,
|
query_dim,
|
||||||
attn_dim,
|
attn_dim,
|
||||||
kernel_size=7,
|
kernel_size=31,
|
||||||
filters=20):
|
filters=32):
|
||||||
super(LocationSensitiveAttention, self).__init__()
|
super(LocationSensitiveAttention, self).__init__()
|
||||||
self.kernel_size = kernel_size
|
self.kernel_size = kernel_size
|
||||||
self.filters = filters
|
self.filters = filters
|
||||||
|
|
9
train.py
9
train.py
|
@ -315,10 +315,15 @@ def evaluate(model, criterion, criterion_st, data_loader, ap, current_step):
|
||||||
try:
|
try:
|
||||||
wav, linear_spec, alignments = synthesis(model, ap, test_sentence,
|
wav, linear_spec, alignments = synthesis(model, ap, test_sentence,
|
||||||
use_cuda, c.text_cleaner)
|
use_cuda, c.text_cleaner)
|
||||||
|
|
||||||
|
file_path = os.path.join(AUDIO_PATH, str(current_step))
|
||||||
|
os.makedirs(file_path, exist_ok=True)
|
||||||
|
file_path = os.path.join(file_path, "TestSentence_{}.wav".format(idx))
|
||||||
|
ap.save_wav(wav, file_path)
|
||||||
|
|
||||||
wav_name = 'TestSentences/{}'.format(idx)
|
wav_name = 'TestSentences/{}'.format(idx)
|
||||||
tb.add_audio(
|
tb.add_audio(
|
||||||
wav_name, wav, current_step, sample_rate=c.sample_rate)
|
wav_name, wav, current_step, sample_rate=c.sample_rate)
|
||||||
|
|
||||||
align_img = alignments[0].data.cpu().numpy()
|
align_img = alignments[0].data.cpu().numpy()
|
||||||
linear_spec = plot_spectrogram(linear_spec, ap)
|
linear_spec = plot_spectrogram(linear_spec, ap)
|
||||||
align_img = plot_alignment(align_img)
|
align_img = plot_alignment(align_img)
|
||||||
|
@ -466,6 +471,8 @@ if __name__ == '__main__':
|
||||||
OUT_PATH = os.path.join(_, c.output_path)
|
OUT_PATH = os.path.join(_, c.output_path)
|
||||||
OUT_PATH = create_experiment_folder(OUT_PATH, c.model_name, args.debug)
|
OUT_PATH = create_experiment_folder(OUT_PATH, c.model_name, args.debug)
|
||||||
CHECKPOINT_PATH = os.path.join(OUT_PATH, 'checkpoints')
|
CHECKPOINT_PATH = os.path.join(OUT_PATH, 'checkpoints')
|
||||||
|
AUDIO_PATH = os.path.join(OUT_PATH, 'test_audios')
|
||||||
|
os.mkdir(AUDIO_PATH)
|
||||||
shutil.copyfile(args.config_path, os.path.join(OUT_PATH, 'config.json'))
|
shutil.copyfile(args.config_path, os.path.join(OUT_PATH, 'config.json'))
|
||||||
|
|
||||||
# setup tensorboard
|
# setup tensorboard
|
||||||
|
|
Loading…
Reference in New Issue