[Fix Bug] Voice Ava (Premium) not found, add dynamic module for macos tts
Background
This pull request aims to improve the macOS TTS voice support in the Auto-GPT repository. The previous implementation had a fixed voice for the second agent, "Ava (Premium)", which might not be available on all systems. This PR provides a more dynamic approach to handling macOS TTS voices.
Changes
- The MacOSTTS class has been updated to include a
_setup()method that fetches the available voices on the system and sets up the default and custom voices accordingly. - Added a
get_voice_names()method to the MacOSTTS class to retrieve available voice names on the system. - Updated the
_speech()method in the MacOSTTS class to use voices from the_voiceslist instead of hardcoding voice names. - Updated the
.env.templateandconfig.pyfiles to include new environment variables for specifying custom macOS TTS voices.
Documentation
In-code comments and descriptions have been added to the MacOSTTS class methods, explaining their purpose, functionality, input arguments, and return values.
Test Plan
- Set up the Auto-GPT repository on a macOS system.
- Configure the
.envfile to enable macOS TTS support and specify custom voices using the provided environment variables. - Run the Auto-GPT application and test with various prompts to ensure that the macOS TTS voices are working correctly and switching between different voices as expected.
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.
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.
@Torantulino
If you have time to check this PR, it doesn't have any breaking change and it will fix voice issues on the second ai agent on Macos 🙏
I think default for macos should be "say text" without any voice then. I had added a file that determines the available voices as well, it got deleted at some point. There are "bettter quality" options to use by gathering the xml file within siri in the system, that's where I got mine from:
catherine martha maeve riya nora leona gordon arthur aidan akash aaron xander
to use them you have to add the path as prefix
Hi @Wladastic
Yeah you are right i can update my PR for the main agent to not use any specific voice. But the problem currently is the second voice "Ava premium" is not recognised and when auto-GPT spin up an other agent it's just silent.
i am using say -v '?' which is listing the available voice option on your Os.
So you can provide any voice listed from the say -v '?'
It also better to have 2 voices when using the vocal option so you can easily know which agent is speaking.
I ll update my PR to remove the voice for the first agent and add the command to list all the available voice in the .env.example
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Ignored Deployment
| Name | Status | Preview | Comments | Updated (UTC) |
|---|---|---|---|---|
| docs | ⬜️ Ignored (Inspect) | Visit Preview | Apr 28, 2023 6:22am |
Codecov Report
Patch coverage: 22.72% and project coverage change: -0.17 :warning:
Comparison is base (
1772a01) 54.86% compared to head (45d5075) 54.70%.
:exclamation: Current head 45d5075 differs from pull request most recent head 062821e. Consider uploading reports for the commit 062821e to get more accurate results
Additional details and impacted files
@@ Coverage Diff @@
## master #2489 +/- ##
==========================================
- Coverage 54.86% 54.70% -0.17%
==========================================
Files 65 65
Lines 3020 3038 +18
Branches 508 510 +2
==========================================
+ Hits 1657 1662 +5
- Misses 1227 1240 +13
Partials 136 136
| Impacted Files | Coverage Δ | |
|---|---|---|
| autogpt/speech/macos_tts.py | 28.57% <15.00%> (-13.10%) |
:arrow_down: |
| autogpt/config/config.py | 77.12% <100.00%> (+0.30%) |
: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.
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
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.