AutoGPT icon indicating copy to clipboard operation
AutoGPT copied to clipboard

Fixing --speak error from docker compose (no module named GI)

Open cardangi opened this issue 2 years ago • 3 comments

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 changed the behavior of Auto-GPT?   -5 pts
    • [x] Have you also run agbenchmark to verify that these changes do not regress performance?   +10 pts

cardangi avatar Sep 09 '23 15:09 cardangi

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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Sep 09 '23 15:09 netlify[bot]

AFAIK Docker doesn't support playing audio anyways, does it?

Pwuts avatar Feb 20 '24 10:02 Pwuts

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

github-actions[bot] avatar May 22 '24 12:05 github-actions[bot]

Turns out docker does support this with a remote pulse audio server

ntindle avatar Jun 13 '24 02:06 ntindle

@ntindle, cool that it's possible, but I don't think that is worth supporting/maintaining right now. TTS is a UI functionality anyway.

Pwuts avatar Jun 14 '24 02:06 Pwuts

Fair let's close

ntindle avatar Jun 14 '24 02:06 ntindle