Skip to content

fix: pass speed and emotion params through tts() and tts_to_file()#4414

Open
ivanVgusev wants to merge 2 commits intocoqui-ai:devfrom
ivanVgusev:fix/speed-param-not-forwarded
Open

fix: pass speed and emotion params through tts() and tts_to_file()#4414
ivanVgusev wants to merge 2 commits intocoqui-ai:devfrom
ivanVgusev:fix/speed-param-not-forwarded

Conversation

@ivanVgusev
Copy link
Copy Markdown

Problem

speed passed to tts_to_file() and
tts() was silently consumed and never
forwarded to the underlying model. As a
result:

  tts.tts_to_file(..., speed=1.5)

had no effect on XTTS v2, even though
Xtts.inference() fully supports
speed.

Root cause

  • tts_to_file() did not pass
    speed/emotion to self.tts()
  • tts() did not pass speed to
    self.synthesizer.tts()

synthesizer.tts() forwards **kwargs
Xtts.synthesize()inference(),
so the fix only required two missing
arguments in the API layer.

Changes

  • tts(): add speed=speed to
    synthesizer.tts() call
  • tts_to_file(): add speed=speed, emotion=emotion to self.tts() call
  • Update docstrings: speed works with
    XTTS v2, not only Coqui Studio models

speed passed to tts_to_file() and tts() was silently consumed and never
forwarded to the underlying model. Xtts.inference() supports speed natively,
but the parameter was dropped in the API layer before reaching synthesizer.tts().

- tts_to_file(): pass emotion and speed to self.tts()
- tts(): pass speed to self.synthesizer.tts()
- Update docstrings: speed works with XTTS v2, not only Coqui Studio models
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


ivanVgusev seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@eginhard
Copy link
Copy Markdown
Contributor

You can use our fork (available via pip install coqui-tts) where this is fixed since v0.26.0. This repo is not maintained anymore.

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.

3 participants