-
Notifications
You must be signed in to change notification settings - Fork 56
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
[Feature request] Server api to return available model names and speaker id; load and unload downloaded model #37
Comments
Seems sensible, at least listing models/languages/speakers should be straightforward. I won't implement this myself since we don't use this server, but would merge a PR. |
Hi @eginhard, can I work on this issue? |
@Roy6250 Sure, thank you! I'd suggest to leave out the part about (un)loading models for now to keep it simple. We could discuss it at a later stage. |
Sure, Thanks. |
Hi @eginhard, went through repo. Made the setup. Before proceeding, would like to verify if I am in the correct path. Requirement: List available model_names, languages and speakerIds. Solution: From .models.json from TTS directory I will get the model names and languages. But not able to find out speakerIds. It would be helpful if you point me in the correct direction. Thanks |
Hi @eginhard please let me know your views. Thanks |
@Roy6250 You don't need to parse the coqui-ai-TTS/TTS/bin/synthesize.py Line 425 in 20bbb41
|
Thanks for the help @eginhard. Using the helper functions, I was able to fetch all the models and languages. Using this I can fetch the speaker names for a particular model. speakers=synthesizer.tts_model.speaker_manager.name_to_id `For this I have to download the model. This approach doesn't seem viable. Shall I preprocess and store the speaker names in json format and then show it from there during GET request? |
@Roy6250 I would only return the speaker names for the currently loaded model and not for any arbitrary one to keep it simple. |
@eginhard Sure, got it. Just one final query, about the API structure: Request Type: GET Response :{ |
@Roy6250 I'd suggest to create separate endpoints for each of these. Also check what is already available, e.g. I see that there is coqui-ai-TTS/TTS/server/server.py Line 216 in 19fce2c
coqui-ai-TTS/TTS/server/server.py Line 227 in 19fce2c
|
Right now, you can request server to return audio by fetching
http://localhost:5002/api/tts?text={text}&speaker_id={speaker}
Can we also have api points for the server to return available model names and speaker ids (for multi speakers) as well as load and unload downloaded model?
Thanks for your consideration!
The text was updated successfully, but these errors were encountered: