AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

[Fix Bug] Voice Ava (Premium) not found, add dynamic module for macos tts

Open gabkk opened this issue 2 years ago • 5 comments

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

  1. 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.
  2. Added a get_voice_names() method to the MacOSTTS class to retrieve available voice names on the system.
  3. Updated the _speech() method in the MacOSTTS class to use voices from the _voices list instead of hardcoding voice names.
  4. Updated the .env.template and config.py files 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

  1. Set up the Auto-GPT repository on a macOS system.
  2. Configure the .env file to enable macOS TTS support and specify custom voices using the provided environment variables.
  3. 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.

gabkk avatar Apr 19 '23 04:04 gabkk

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

github-actions[bot] avatar Apr 19 '23 17:04 github-actions[bot]

Conflicts have been resolved! 🎉 A maintainer will review the pull request shortly.

github-actions[bot] avatar Apr 20 '23 02:04 github-actions[bot]

@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 🙏

gabkk avatar Apr 21 '23 03:04 gabkk

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

Wladastic avatar Apr 21 '23 07:04 Wladastic

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

gabkk avatar Apr 21 '23 17:04 gabkk

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

vercel[bot] avatar Apr 27 '23 03:04 vercel[bot]

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.

codecov[bot] avatar Apr 28 '23 06:04 codecov[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-

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]