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

[TTS] deprecate AudioToCharWithPriorAndPitchDataset. #5959

Merged
merged 1 commit into from
Feb 8, 2023
Merged
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
18 changes: 1 addition & 17 deletions nemo/collections/tts/models/fastpitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,8 @@ def __init__(self, cfg: DictConfig, trainer: Trainer = None):
assert self.vocab is not None
input_fft_kwargs["n_embed"] = len(self.vocab.tokens)
input_fft_kwargs["padding_idx"] = self.vocab.pad
# TODO @xueyang: remove AudioToCharWithPriorAndPitchDataset because it has been deprecated already.
elif self.ds_class_name == "AudioToCharWithPriorAndPitchDataset":
logging.warning(
"AudioToCharWithPriorAndPitchDataset class has been deprecated. No support for"
" training or finetuning. Only inference is supported."
)
tokenizer_conf = self._get_default_text_tokenizer_conf()
self._setup_tokenizer(tokenizer_conf)
assert self.vocab is not None
input_fft_kwargs["n_embed"] = len(self.vocab.tokens)
input_fft_kwargs["padding_idx"] = self.vocab.pad
else:
raise ValueError(f"Unknown dataset class: {self.ds_class_name}")
raise ValueError(f"Unknown dataset class: {self.ds_class_name}.")

self._parser = None
self._tb_logger = None
Expand Down Expand Up @@ -238,11 +227,6 @@ def parser(self):

if ds_class_name == "TTSDataset":
self._parser = self.vocab.encode
elif ds_class_name == "AudioToCharWithPriorAndPitchDataset":
if self.vocab is None:
tokenizer_conf = self._get_default_text_tokenizer_conf()
self._setup_tokenizer(tokenizer_conf)
self._parser = self.vocab.encode
else:
raise ValueError(f"Unknown dataset class: {ds_class_name}")
else:
Expand Down
2 changes: 0 additions & 2 deletions nemo/collections/tts/models/tacotron2.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,6 @@ def parser(self):
abbreviation_version="fastpitch",
make_table=False,
)
elif ds_class_name == "AudioToCharWithPriorAndPitchDataset":
self.parser = self.vocab.encode
else:
raise ValueError("Wanted to setup parser, but model does not have necessary paramaters")

Expand Down