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

More rigorous check to prevent text being split for TTS if the split is at the end #1065

Merged
merged 4 commits into from
Jul 24, 2022

Conversation

joshgreenwood2003
Copy link
Contributor

@joshgreenwood2003 joshgreenwood2003 commented Jul 23, 2022

Description

now will process text when text is split for TTS, before checking if the end of the split text is empty

Issue Fixes

fixes #1064

None

Checklist:

  • [ X] I am pushing changes to the develop branch
  • [ X] I am using the recommended development environment
  • [ X] I have performed a self-review of my own code
  • [ X] I have commented my code, particularly in hard-to-understand areas
  • [X ] I have formatted and linted my code using python-black and pylint
  • [X ] I have cleaned up unnecessary files
  • [X ] My changes generate no new warnings
  • [X ] My changes follow the existing code-style
  • My changes are relevant to the project

Any other information (e.g how to test the changes)

None

@joshgreenwood2003 joshgreenwood2003 changed the title fix issue #1064 More rigorous check to prevent text being split for TTS if the split is at the end Jul 23, 2022
Copy link
Collaborator

@JasonLovesDoggo JasonLovesDoggo left a comment

Choose a reason for hiding this comment

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

This is kind of inefficient as you are calling it three times now

Can you just create a new variable with the processed text and use that instead

@joshgreenwood2003
Copy link
Contributor Author

added requested changes

@@ -119,7 +120,7 @@ def split_post(self, text: str, idx: int):

def call_tts(self, filename: str, text: str):
self.tts_module.run(
text=process_text(text), filepath=f"{self.path}/{filename}.mp3"
text, filepath=f"{self.path}/{filename}.mp3"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you just remove the process text call

Process_text now called before call_tts to ensure it is called minimally while allowing for verification that text is not empty
@JasonLovesDoggo JasonLovesDoggo merged commit b463d22 into elebumm:develop Jul 24, 2022
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