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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃 Hub and TensorFlowTTS integration for Inference API #588

Closed
osanseviero opened this issue Jun 2, 2021 · 9 comments
Closed

馃 Hub and TensorFlowTTS integration for Inference API #588

osanseviero opened this issue Jun 2, 2021 · 9 comments
Assignees
Labels
Discussion 馃榿 Discuss new feature wontfix

Comments

@osanseviero
Copy link

Hi TensorSpeech team! I propose building on top of the existing integration with 馃 Hub to enable the Inference API and widgets

Current Status

Screen Shot 2021-06-02 at 4 49 45 PM

  • With the same PR, users now have access to a code snippet that shows how to load the model. You can use text-to-mel and mel-to-wav so the code snippet is different.

Screen Shot 2021-06-02 at 4 50 24 PM

What can we do next?
Our next step is to integrate it to the Inference API. This would make the widget in the model repos work and allow anyone to make requests to the API, which is very exciting!

The main challenge is that TTS is a two-step process: converting text to mel, and mel to speech. At the moment, every single repo only has one of the two components, so there is no way to make inference work end-to-end.

What do you think of bundling the two models? That is, in a single repo we would have Fastspeech2 and Melgan for example. We would only do this for the repos for which the Inference API is wanted, so it wouldn't be for all of them.

Happy to hear your thoughts,
Omar

cc @patrickvonplaten @julien-c

@dathudeptrai dathudeptrai self-assigned this Jun 3, 2021
@dathudeptrai dathudeptrai added the Discussion 馃榿 Discuss new feature label Jun 3, 2021
@julien-c
Copy link

julien-c commented Jun 3, 2021

on my (end user) side, bundling models into an easy-to-use end to end TTS "model" (for at least a few of your repos) would be awesome!

We already have a TTS widget so we could showcase your models super quickly.

@dathudeptrai
Copy link
Collaborator

@julien-c @osanseviero Great!. So I need to write an End-2-End Model class that combines 2 models into 1 model ? or just need to put all of them into 1 repo? :D

@osanseviero
Copy link
Author

I think that ideally we would have a single class in a way that we could do something like this:

from tensorflow_tts.inference import AutoProcessor, TFE2EAutoModel

processor = AutoProcessor.from_pretrained(REPO_ID)
model = TFE2EAutoModel.from_pretrained(REPO_ID)
audios = model.inference(mels)

The corresponding repo would contain both the text to mel and mel to speech models, but it would be a nice improvement in my opinion. What do you think about it? It would also simplify usage considerably for other users

@dathudeptrai
Copy link
Collaborator

dathudeptrai commented Jun 3, 2021

Yeah, that would be the best choice :D. Will do that in this week :D. @osanseviero

@osanseviero
Copy link
Author

Hi @dathudeptrai.

Thanks for all the great work around TensorFlowTTS 馃槃 I was wondering if you got a chance to work on this.

Cheers!

@dathudeptrai
Copy link
Collaborator

Hi @dathudeptrai.

Thanks for all the great work around TensorFlowTTS I was wondering if you got a chance to work on this.

Cheers!

:D. I'm struggling with some other stuff, I will let you know when I finish the implementation :D. Hope it can finish this week :D.

@dathudeptrai
Copy link
Collaborator

@osanseviero Hi, sorry for the late implementation, I just won 1st Kaggle NLP competition and now I have more free time to do this feature :D. I want to share my solution here in case you interested in it (https://www.kaggle.com/c/coleridgeinitiative-show-us-the-data/discussion/248253), and ofc, i used HuggingFace Transformer :D.

@osanseviero
Copy link
Author

This is awesome @dathudeptrai! Congratulations!!

@stale
Copy link

stale bot commented Aug 23, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the wontfix label Aug 23, 2021
@stale stale bot closed this as completed Aug 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion 馃榿 Discuss new feature wontfix
Projects
None yet
Development

No branches or pull requests

3 participants