-
Notifications
You must be signed in to change notification settings - Fork 606
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
Refactor G2P module and related process #5
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this refactor impacts many modules. Is it tested? We need to make sure training and inference work, and performance is not degraded.
models/tts/base/tts_dataset.py
Outdated
return packed_batch_features | ||
|
||
|
||
#===================== Deprecated Code ============================ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If deprecated, can delete them.
models/tts/base/tts_trainer.py
Outdated
"batch_size": self.cfg.train.batch_size, | ||
} | ||
return state_dict | ||
# def _get_state_dict(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not used? If so, delete the commented lines
models/tts/base/tts_trainer.py
Outdated
ckpt_path = os.path.join(path, "epoch-{:04d}.pt".format(self.epoch)) | ||
state_dict = self._get_state_dict() | ||
torch.save(state_dict, ckpt_path) | ||
# ckpt_path = os.path.join(path, "epoch-{:04d}.pt".format(self.epoch)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete commented lines
models/tts/base/tts_trainer.py
Outdated
ckpt_path = os.path.join(path, "epoch-{:04d}.pt".format(self.epoch)) | ||
state_dict = self._get_state_dict() | ||
torch.save(state_dict, ckpt_path) | ||
# ckpt_path = os.path.join(path, "epoch-{:04d}.pt".format(self.epoch)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete commented lines
models/tts/valle/valle_dataset.py
Outdated
) | ||
unique_tokens = SymbolTable.from_file(text_token_path) | ||
text_tokenizer = TextToken(unique_tokens.symbols, add_bos=True, add_eos=True) | ||
# ### get text tokenizer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete commented lines
models/tts/valle/valle_dataset.py
Outdated
prompt_phone_id_seq, prompt_phn_len = text_tokenizer.get_token_id_seq(utt_info["Prompt_phone"]) | ||
self.utt2seq[utt] = phone_id_seq | ||
self.utt2pmtseq[utt] = prompt_phone_id_seq | ||
# if cfg.preprocess.phone_extractor == 'lexicon': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
too many commented lines. We need to delete them!
models/tts/vits/vits_trainer.py
Outdated
def _build_model(self): | ||
|
||
# if self.cfg.preprocess.phone_extractor == 'lexicon': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
delete commented lines
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approved
Refactor code related to g2p, including: