AutoGPT
AutoGPT copied to clipboard
Fixing --speak error from docker compose (no module named GI)
Issue:
Exception in thread Thread-1 (speak): Traceback (most recent call last): File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/usr/local/lib/python3.10/threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "/app/autogpt/speech/say.py", line 27, in speak success = voice_engine.say(text, voice_index) File "/app/autogpt/speech/base.py", line 45, in say return self._speech(text, voice_index) File "/app/autogpt/speech/gtts.py", line 21, in _speech playsound("speech.mp3", True) File "/usr/local/lib/python3.10/site-packages/playsound.py", line 91, in _playsoundNix import gi ModuleNotFoundError: No module named 'gi'
This error was caused because there's not an RUN for the needed packages (which firstly are pycairo and PyGObject).
Other packages are just for good measuring and avoiding other kind of exceptions.
Background
Changes 🏗️
PR Quality Scorecard ✨
- [ ] Have you used the PR description template?
+2 pts - [x] Is your pull request atomic, focusing on a single change?
+5 pts - [x] Have you linked the GitHub issue(s) that this PR addresses?
+5 pts - [x] Have you documented your changes clearly and comprehensively?
+5 pts - [ ] Have you changed or added a feature?
-4 pts- [ ] Have you added/updated corresponding documentation?
+4 pts - [x] Have you added/updated corresponding integration tests?
+5 pts
- [ ] Have you added/updated corresponding documentation?
- [ ] Have you changed the behavior of Auto-GPT?
-5 pts- [x] Have you also run
agbenchmarkto verify that these changes do not regress performance?+10 pts
- [x] Have you also run
Deploy Preview for auto-gpt-docs ready!
| Name | Link |
|---|---|
| Latest commit | 5b9704a6411cf2977c569eff7990c78686729f4a |
| Latest deploy log | https://app.netlify.com/sites/auto-gpt-docs/deploys/64fc9462e41a0d0008ed4575 |
| Deploy Preview | https://deploy-preview-5186--auto-gpt-docs.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
The issue in case is this one: [(https://github.com/Significant-Gravitas/Auto-GPT/issues/1697)]
AFAIK Docker doesn't support playing audio anyways, does it?
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request.
Turns out docker does support this with a remote pulse audio server
@ntindle, cool that it's possible, but I don't think that is worth supporting/maintaining right now. TTS is a UI functionality anyway.
Fair let's close