Skip to content

Commit

Permalink
Fix the bug in extract tts spectrograms
Browse files Browse the repository at this point in the history
  • Loading branch information
Edresson authored and erogol committed Dec 20, 2021
1 parent 2b2ceca commit 85418ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions TTS/bin/extract_tts_spectrograms.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ def setup_loader(ap, r, verbose=False):
enable_eos_bos=c.enable_eos_bos_chars,
use_noise_augment=False,
verbose=verbose,
speaker_id_mapping=speaker_manager.speaker_ids,
d_vector_mapping=speaker_manager.d_vectors if c.use_speaker_embedding and c.use_d_vector_file else None,
speaker_id_mapping=speaker_manager.speaker_ids if c.use_speaker_embedding else None,
d_vector_mapping=speaker_manager.d_vectors if c.use_d_vector_file else None,
)

if c.use_phonemes and c.compute_input_seq_cache:
Expand Down Expand Up @@ -235,13 +235,14 @@ def main(args): # pylint: disable=redefined-outer-name
meta_data = meta_data_train + meta_data_eval

# init speaker manager
if config.use_speaker_embedding:
if c.use_speaker_embedding:
speaker_manager = SpeakerManager(data_items=meta_data)
elif config.use_d_vector_file:
elif c.use_d_vector_file:
speaker_manager = SpeakerManager(d_vectors_file_path=c.d_vector_file)
else:
speaker_manager = None


# setup model
model = setup_model(c)

Expand Down
2 changes: 1 addition & 1 deletion TTS/bin/train_tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def main():
train_samples=train_samples,
eval_samples=eval_samples,
training_assets={"audio_processor": ap},
parse_command_line_args=True,
parse_command_line_args=False,
)
trainer.fit()

Expand Down

0 comments on commit 85418ff

Please sign in to comment.