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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new env variable and speech function for alternative TTS voice #754

Merged
merged 9 commits into from
Apr 14, 2023

Conversation

meta-fx
Copy link
Contributor

@meta-fx meta-fx commented Apr 11, 2023

Background

This change was introduced to provide users with an alternative TTS voice option using the StreamElements API. It allows users to switch between the default TTS voice and the new alternative voice easily.

Changes

1.) Added a new brian_speech function to the speech.py file, which utilizes the StreamElements API for an alternative TTS voice.
2.) Added a new environment variable and modified the config.py file to account for the new environment variable so that users to choose between the default TTS voice and the alternative voice.

Documentation

The changes made in this pull request are documented in the code through comments, explaining the purpose of the new function and the environment variable.

Test Plan

1.) Tested the new function with various text inputs to ensure that the alternative TTS voice works as expected.
2.) Tested the environment variable by toggling its value and verified that the selected TTS voice is used accordingly.

PR Quality Checklist

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

@alexonab
Copy link
Contributor

There seem to be unnecessary new lines added that are not needed for the proposed change functionality.

@meta-fx
Copy link
Contributor Author

meta-fx commented Apr 11, 2023

There seem to be unnecessary new lines added that are not needed for the proposed change functionality.

Yeah I noticed that afterwards, my editor formats my code and adds unnecessary lines. I need to fix that and try again.

Copy link
Contributor

@nponeccop nponeccop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove occasionally introduced whitespace changes

scripts/config.py Outdated Show resolved Hide resolved
scripts/config.py Outdated Show resolved Hide resolved
scripts/speak.py Outdated Show resolved Hide resolved
scripts/speak.py Outdated Show resolved Hide resolved
@nponeccop nponeccop mentioned this pull request Apr 11, 2023
1 task
nponeccop
nponeccop previously approved these changes Apr 12, 2023
.env.template Outdated
@@ -13,3 +13,4 @@ OPENAI_AZURE_DEPLOYMENT_ID=deployment-id-for-azure
IMAGE_PROVIDER=dalle
HUGGINGFACE_API_TOKEN=
USE_MAC_OS_TTS=False
USE_BRIAN_TTS=False
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a final newline

@nponeccop
Copy link
Contributor

@meta-fx There are conflicts now

@nponeccop nponeccop mentioned this pull request Apr 13, 2023
1 task
Copy link
Contributor

@nponeccop nponeccop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You still need to add that newline you removed back. Just press Enter in your editor at the end of .env.template once. People keep adding and removing newlines creating conflicts. It isn't good, and the right way is to have the final line separator. Some editors keep removing it, vim insist in adding it.

nponeccop
nponeccop previously approved these changes Apr 14, 2023
richbeales
richbeales previously approved these changes Apr 14, 2023
@richbeales
Copy link
Contributor

please fix flake8

scripts/speak.py:55:1: E302 expected 2 blank lines, found 1
scripts/speak.py:72:1: E302 expected 2 blank lines, found 1

then this can be merged. Thanks

@meta-fx meta-fx dismissed stale reviews from richbeales and nponeccop via 1612069 April 14, 2023 07:19
@p-i- p-i- merged commit aca16db into Significant-Gravitas:master Apr 14, 2023
sindlinger pushed a commit to Orgsindlinger/Auto-GPT-WebUI that referenced this pull request Sep 25, 2024
Added new env variable and speech function for alternative TTS voice
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.

5 participants