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

Callback for time left in generating speech with tts.predict #10

Open
C-Loftus opened this issue Oct 19, 2024 · 1 comment
Open

Callback for time left in generating speech with tts.predict #10

C-Loftus opened this issue Oct 19, 2024 · 1 comment

Comments

@C-Loftus
Copy link

Hi! Thank you for making this library. It is very useful. I am trying to think about ways to improve UX for speaking longer blocks of text.

  • I was wondering if it would be possible to add a progress callback for how long it will take to complete an inference instead of just having a callback for downloading.
    • (i.e. progress.secondsLeftApprox , progress.bytesLeft or something analogous).
    • Without a feature like this, it is harder for users to know if a long generation time is expected or due to a bug

If you have other ideas that might be better, please don't hesitate to let me know or push me towards other directions. I would be happy to submit a PR for a feature like this.
Thank you

@raymondtri
Copy link

I believe there are too many factors to really make this possible. However, you can give a rough approximation (and improve performance in long blocks of text) by breaking things into paragraphs / sentences and then invoking over that. As they complete you can get some idea of how many characters have been processed and the speed at which translation is happening in order to estimate completion.

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

No branches or pull requests

2 participants