Skip to content

Commit

Permalink
Merge pull request espnet#4355 from kan-bayashi/fix_lid_in_gan_tts
Browse files Browse the repository at this point in the history
  • Loading branch information
kan-bayashi authored May 11, 2022
2 parents dd24d7d + 71f3c88 commit 39bae01
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
23 changes: 20 additions & 3 deletions espnet2/tasks/gan_tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,9 @@ def build_collate_fn(
]:
assert check_argument_types()
return CommonCollateFn(
float_pad_value=0.0, int_pad_value=0, not_sequence=["spembs", "sids"]
float_pad_value=0.0,
int_pad_value=0,
not_sequence=["spembs", "sids", "lids"],
)

@classmethod
Expand Down Expand Up @@ -260,10 +262,25 @@ def optional_data_names(
cls, train: bool = True, inference: bool = False
) -> Tuple[str, ...]:
if not inference:
retval = ("spembs", "sids", "durations", "pitch", "energy")
retval = (
"spembs",
"durations",
"pitch",
"energy",
"sids",
"lids",
)
else:
# Inference mode
retval = ("spembs", "sids", "speech", "durations", "pitch", "energy")
retval = (
"spembs",
"speech",
"durations",
"pitch",
"energy",
"sids",
"lids",
)
return retval

@classmethod
Expand Down
19 changes: 17 additions & 2 deletions espnet2/tasks/tts.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,25 @@ def optional_data_names(
cls, train: bool = True, inference: bool = False
) -> Tuple[str, ...]:
if not inference:
retval = ("spembs", "durations", "pitch", "energy", "sids", "lids")
retval = (
"spembs",
"durations",
"pitch",
"energy",
"sids",
"lids",
)
else:
# Inference mode
retval = ("spembs", "speech", "durations", "sids", "lids")
retval = (
"spembs",
"speech",
"durations",
"pitch",
"energy",
"sids",
"lids",
)
return retval

@classmethod
Expand Down

0 comments on commit 39bae01

Please sign in to comment.