Skip to content

Commit

Permalink
[TTS] Fix defaulting of use_log_energy
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan <rlangman@nvidia.com>
  • Loading branch information
rlangman committed May 15, 2023
1 parent af017be commit c3009e8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion nemo/collections/tts/models/fastpitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ def __init__(self, cfg: DictConfig, trainer: Trainer = None):
speaker_emb_condition_prosody = cfg.get("speaker_emb_condition_prosody", False)
speaker_emb_condition_decoder = cfg.get("speaker_emb_condition_decoder", False)
speaker_emb_condition_aligner = cfg.get("speaker_emb_condition_aligner", False)
use_log_energy = cfg.get("use_log_energy", True)
if n_speakers > 1 and "add" not in input_fft.cond_input.condition_types:
input_fft.cond_input.condition_types.append("add")
if speaker_emb_condition_prosody:
Expand All @@ -177,7 +178,7 @@ def __init__(self, cfg: DictConfig, trainer: Trainer = None):
energy_embedding_kernel_size,
cfg.n_mel_channels,
cfg.max_token_duration,
cfg.use_log_energy,
use_log_energy,
)
self._input_types = self._output_types = None
self.export_config = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
import pytest
import torch

from nemo.collections.tts.parts.utils.tts_dataset_utils import get_abs_rel_paths, get_audio_filepaths, normalize_volume
from nemo.collections.tts.parts.utils.tts_dataset_utils import (
filter_dataset_by_duration,
get_abs_rel_paths,
get_audio_filepaths,
normalize_volume,
stack_tensors,
)

Expand Down

0 comments on commit c3009e8

Please sign in to comment.