-
Notifications
You must be signed in to change notification settings - Fork 44.4k
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
In speak mode: ModuleNotFoundError: No module named 'gi' #1697
Comments
Same issue here. |
The speech synthesis function activated with --speak argument, seems to rely on a I managed to fix the error by adding It also requires three dependency packages to be installed using apt:
It can be done adding theses lines to the DockerFIle:
It fixed the issues but now the command hangs after the AI name (without error):
I assume this due to a missing sound interface in the docker container, which makes sense. |
I had to uninstall and reinstall the See this related discussion |
Unfortunately the above solution didn't work for me.
|
Hum.. the error seems to be the same on your side. |
The error is different + more verbose from the initial post. I'll try it on another machine see if I can reproduce it. |
I uninstalled version 1.2.2 of playsound and pip reinstalled it which grabbed version 1.3.0. This fixed the speak issue in my environment. Should this issue be closed? |
I haven't been able to solve the Gst namespace issue yet, running VS Code on Windows with a dev container
|
@dmkilday I tried your solution, unfortunately it was not successful for me while running in a dev container. I'm using autogpt outside a container at this point, which appears to work as expected. |
Yes, I am not in a container either. Perhaps the issue is docker specific.
…On Sat, Apr 22, 2023, 11:26 AM Yegor S ***@***.***> wrote:
@dmkilday <https://github.com/dmkilday> I tried your solution,
unfortunately it was not successful for me while running in a dev container.
I'm using autogpt outside a container at this point, which appears to work
as expected.
—
Reply to this email directly, view it on GitHub
<#1697 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFDDA32KU35RFB2DUQNS753XCQICVANCNFSM6AAAAAAW7T4DW4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I am running Python 3.11.3 in a virtual environment within WSL2, ubuntu 20.04. I originally was having issues as well with "gi" per the original issue description but I was able to get past that after installing pyobjc in my virtual environment:
For reference, I am using playsound 1.2.2:
This was then causing the following error to be thrown when the bot attempted to use TTS to the user:
[above code is edited to not have full path] I was able to get past this by performing the following global in my linux environment:
This appears to get me past the errors being thrown but now it is hanging when attempting to get to the speak portion of dialog:
aborting out shows:
So at this point it seems, atleast for my situation with WSL2, that the audio may not be getting passed from Windows to the Linux Subsystem correctly. I am going to continue down the rabbit hole, but not sure if I will get anywhere. Would just be easier at this point to create a virtualbox with Ubuntu and build it in there. Posted my information here for future prosperity |
@DouglasC2022 thanks for posting, I came to a similar conclusion. I'm wondering if there's a solution external to Auto-GPT, but I haven't been able to hunt one down re: WSL2. |
I'm going to take a stab at this issue with the goals of:
|
On macOS this requires |
I'm having this issue as well when using Docker and when using a VSCode Dev Container. Tried some of the fixes from this thread with no success. |
Since this issue does seem to be happening for other people, I wanted to mention a couple things I found while trying to debug
If you get PulseAudio or another solution working, or happen to know the common solution for piping audio out of a container, please report back! |
This worked for me (Windows, using virtualenv): |
This doesnt work for me -- can you comment on how you have your setup configured? are you using WSL2? python version? |
still getting the following error: |
I believe that the people who are able to fix it by installing the correct
|
Nope not using WSL2, python v3.11 (sorry for late reply!) |
Hi all,
After that : using python 3.11 |
This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days. |
As far as I know this issue remains unresolved - Commenting to remove the stale tag. |
This issue has automatically been marked as stale because it has not had any activity in the last 50 days. You can unstale it by commenting or removing the label. Otherwise, this issue will be closed in 10 days. |
This issue was closed automatically because it has been stale for 10 days with no activity. |
I'm working on it now. Very frustrating... I'm on Ubuntu 22, Python 3.10, Jetson Orin Nano Arm64 server. Exact same error. Exception in thread Thread-2 (_speak): |
I don't know if your problem is exactly the same as mine, but I'll share the process I went through to fix the gi module error when using playsound. The environment I was working in is a GitHub code space.
sudo apt-get update
pip install PyGObject
export GI_TYPELIB_PATH="/usr/lib/girepository-1.0" Entering this command in the terminal will apply it only to the current session. To make it permanent, add it to your ~/.bashrc file: echo 'export GI_TYPELIB_PATH="/usr/lib/girepository-1.0"' >> ~/.bashrc This may resolve the issues with the gi module and allow you to use the Gst namespace in your Python scripts. |
Duplicates
Steps to reproduce 🕹
speech.mpeg file is generated and saved to disk, but the below error occurs.
Current behavior 😯
Beyond saying
y
, all further interactions are impossible (program freezes).Expected behavior 🤔
No response
Your prompt 📝
N/A
The text was updated successfully, but these errors were encountered: