AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Add StreamElements TTS support with 3 configurable voices.

Open dayofthedave opened this issue 2 years ago • 2 comments

Background

As a StreamElements user, I want to be able to use multiple voices and choose my preferred voices easily. Making the voices configurable in .env makes it easy to choose voices without have to edit code.

The StreamElements TTS module can be enabled in .env via the USE_SE_TTS setting. Voices can be specified in .env using the SE_VOICE_1, SE_VOICE_2 and SE_VOICE_3 settings. They will default to Emma, Brian and Amy if no settings are specified in .env.

Changes

  1. Create a new StreamElementsSpeech class using BrianSpeech as a model.
  2. Add support for this new module in say.py
  3. Add support to enable module via .env in config.py

Note: The new StreamElementsSpeech module essentially replaces the BrianSpeech module, but the BrianSpeech module is not removed by this change.

Documentation

Retained comments copied over from BrianSpeech.

Test Plan

I ran through several different scenarios with speech enabled. Note that I did not test every possible voice.

PR Quality Checklist

  • [x] My pull request is atomic and focuses on a single change.
  • [x] I have thoroughly tested my changes with multiple different prompts.
  • [x] I have considered potential risks and mitigations for my changes.
  • [x] I have documented my changes clearly and comprehensively.
  • [x] I have not snuck in any "extra" small tweaks changes

dayofthedave avatar Apr 30 '23 07:04 dayofthedave

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 5, 2023 10:29pm

vercel[bot] avatar Apr 30 '23 07:04 vercel[bot]

This is a mass message from the AutoGPT core team. Our apologies for the ongoing delay in processing PRs. This is because we are re-architecting the AutoGPT core!

For more details (and for infor on joining our Discord), please refer to: https://github.com/Significant-Gravitas/Auto-GPT/wiki/Architecting

p-i- avatar May 05 '23 00:05 p-i-

You changed AutoGPT's behaviour. The cassettes have been updated and will be merged to the submodule when this Pull Request gets merged.

Auto-GPT-Bot avatar Jun 05 '23 22:06 Auto-GPT-Bot

Codecov Report

Patch coverage: 35.48% and project coverage change: -0.30 :warning:

Comparison is base (60ac0c4) 69.58% compared to head (1e23a9d) 69.29%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3568      +/-   ##
==========================================
- Coverage   69.58%   69.29%   -0.30%     
==========================================
  Files          72       73       +1     
  Lines        3551     3582      +31     
  Branches      569      574       +5     
==========================================
+ Hits         2471     2482      +11     
- Misses        889      909      +20     
  Partials      191      191              
Impacted Files Coverage Δ
autogpt/speech/stream_elements.py 30.76% <30.76%> (ø)
autogpt/speech/say.py 36.36% <33.33%> (-0.31%) :arrow_down:
autogpt/config/config.py 75.81% <100.00%> (+0.32%) :arrow_up:

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar Jun 05 '23 22:06 codecov[bot]

This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.

github-actions[bot] avatar Jun 09 '23 22:06 github-actions[bot]

Looks like this may have been superseded by #4630, although currently the STREAMELEMENTS_VOICE config option is not being used anywhere so I'm not sure the existing implementation of StreamElementsSpeech works as it should.

Would you like to take a shot at fixing up that part of the speech module in a new PR? I'm inclined to close this PR as it implements a feature that is already mostly in the codebase, and the PR itself isn't in mergeable state either, since it has conflicts and proposes to add a second StreamElements voice provider on top of the StreamElements-backed BrianTTS.

Sorry for letting you wait so long, we're working to get back on top of the PR pile. :)

Pwuts avatar Jun 15 '23 22:06 Pwuts

Sure, no problem. Feel free to close this PR. I'll open a new PR that fleshes out the existing StreamElementsSpeech module.

On Thu, Jun 15, 2023 at 6:53 PM Reinier van der Leer < @.***> wrote:

Looks like this may have been superseded by #4630 https://github.com/Significant-Gravitas/Auto-GPT/pull/4630, although currently the STREAMELEMENTS_VOICE config option is not being used anywhere so I'm not sure the existing implementation of StreamElementsSpeech works as it should.

Would you like to take a shot at fixing up that part of the speech module in a new PR? I'm inclined to close this PR as it implements a feature that is already mostly in the codebase, and the PR itself isn't in mergeable state either, since it has conflicts and proposet to add a second StreamElements voice provider on top of the StreamElements-backed BrianTTS.

Sorry for letting you wait so long, we're working to get back on top of the PR pile. :)

— Reply to this email directly, view it on GitHub https://github.com/Significant-Gravitas/Auto-GPT/pull/3568#issuecomment-1593819233, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKYBEFWZXLW552RIFCTSTDXLOHAPANCNFSM6AAAAAAXQXLJUQ . You are receiving this because you authored the thread.Message ID: @.***>

dayofthedave avatar Jun 16 '23 00:06 dayofthedave