Skip to content

Conversation

treya-lin
Copy link
Contributor

  • Within class LexiconModule, move the creation of g2p_en.G2p class from def preprocess_english to def __init__ so that it won't need to recreate the class each time it processes a line of text.
  • Define the g2p class as self.lang2g2p = {'en-us':G2p()} in case other languages will need to be supported in the future

Copy link
Collaborator

@RMSnow RMSnow Dec 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use black to format the code:

pip install black
cd Amphion
black text/g2p_module.py

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done :)

Signed-off-by: treya-lin <86940562+treya-lin@users.noreply.github.com>
@RMSnow RMSnow changed the title Modified LexiconModule so that it only create g2p class once. (#24) Modified LexiconModule so that it only create g2p class once Dec 14, 2023
@RMSnow RMSnow changed the title Modified LexiconModule so that it only create g2p class once Improve the G2P LexiconModule of TTS Dec 14, 2023
@RMSnow RMSnow merged commit 59b5c4b into open-mmlab:main Dec 14, 2023
@treya-lin treya-lin deleted the dev branch December 14, 2023 12:37
@RMSnow RMSnow mentioned this pull request Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants