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
TTS API improvements #2086
TTS API improvements #2086
Conversation
✅ Deploy Preview for localai canceled.
|
backend/python/coqui/coqui_server.py
Outdated
# List available 🐸TTS models | ||
print(TTS().list_models()) | ||
print(TTS().list_models().list_models()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks like a leftover, or is it wanted?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not sure, I will remove it then.
I am planning to include an endpoint to list models/speakers in this PR.
I don't see how the changeset can fix #2073 - is there something missing in the PR? |
@mudler I didn't push those changes yet, I will remove the draft status when I will be done |
@mudler I am trying to understand where/when is the go gRPC server -> TTS service used, Is this a work in progress ? |
backend/python/coqui/coqui_server.py
Outdated
@@ -66,7 +66,19 @@ def LoadModel(self, request, context): | |||
|
|||
def TTS(self, request, context): | |||
try: | |||
self.tts.tts_to_file(text=request.text, speaker_wav=self.AudioPath, language=COQUI_LANGUAGE, file_path=request.dst) | |||
# if model is multilangual add language from request or env as fallback | |||
lang = request.Lang or COQUI_LANGUAGE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can I add a new Lang
field in the protobuf definition ? It would be an optional one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the language is truly independent of both the model, voice, and input text, I see no reason not to have a Language
parameter. Personally, I prefer to spell it out rather than name it Lang
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed better to have clearly defined parameter.
Does it make sense to keep the COQUI_LANGUAGE env var ? What use case does it serve ?
55251d3
to
66e1cd4
Compare
I didn't push the swagger docs, it gave me alot of changes. Quick way to test the language switching capability with multilingual models is something like this: Without specifying lang:The voice uses an English accent.
With lang:Proper language accent is used
|
3ce3154
to
970de10
Compare
Quick update regarding adding TTS Info endpoint. I am skipping this feature from this PR is it would involve too many changes that are out of scope for this PR. Context: The goal is to have the possibility to query available models/speakers or other type of information depending on the backend. My first attempt was to add a gRPC service My proposal is to allow backends grpc service to be spawned without a model and to add a service called I will start a PR or Discussion for this proposal. |
1a2d0cb
to
fa6e144
Compare
Signed-off-by: blob42 <contact@blob42.xyz>
Signed-off-by: blob42 <contact@blob42.xyz>
Signed-off-by: blob42 <contact@blob42.xyz>
Signed-off-by: blob42 <contact@blob42.xyz>
overall looks good, thanks! just few nits/open questions above |
Signed-off-by: blob42 <contact@blob42.xyz>
Signed-off-by: blob42 <contact@blob42.xyz>
- consolidate TTS options under `tts` config entry Signed-off-by: blob42 <contact@blob42.xyz>
Signed-off-by: blob42 <contact@blob42.xyz>
Signed-off-by: blob42 <contact@blob42.xyz>
Description
Improvements to the Coqui TTS API/backend.
language
parameter to TTS endpoint/schema[ ] TTS Info endpoint: List available models, speakers and languages(will start new PR for this one)Notes for Reviewers
Signed commits