MattePalte / Verbify-TTS

Simple and free Text-to-Speech (TTS) engine that reads for you any text on your screen with high-quality voices powered by AI models.
MIT License
115 stars 14 forks source link

Doesn't work with Wayland on Linux #6

Open Merlin04 opened 1 year ago

Merlin04 commented 1 year ago

This seems super cool - I tried to install it though, and when I run it I get this error:

(env) me@c134h067:~/clones/MattePalte--Verbify-TTS> /home/me/clones/MattePalte--Verbify-TTS/env/bin/python /home/me/clones/MattePalte--Verbify-TTS/command_read.py
Traceback (most recent call last):
  File "/home/me/clones/MattePalte--Verbify-TTS/env/lib64/python3.10/site-packages/Xlib/xauth.py", line 43, in __init__
    raw = open(filename, 'rb').read()
FileNotFoundError: [Errno 2] No such file or directory: '/home/me/.Xauthority'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/me/clones/MattePalte--Verbify-TTS/command_read.py", line 9, in <module>
    import pyautogui as pya
  File "/home/me/clones/MattePalte--Verbify-TTS/env/lib64/python3.10/site-packages/pyautogui/__init__.py", line 249, in <module>
    import mouseinfo
  File "/home/me/clones/MattePalte--Verbify-TTS/env/lib64/python3.10/site-packages/mouseinfo/__init__.py", line 223, in <module>
    _display = Display(os.environ['DISPLAY'])
  File "/home/me/clones/MattePalte--Verbify-TTS/env/lib64/python3.10/site-packages/Xlib/display.py", line 80, in __init__
    self.display = _BaseDisplay(display)
  File "/home/me/clones/MattePalte--Verbify-TTS/env/lib64/python3.10/site-packages/Xlib/display.py", line 62, in __init__
    display.Display.__init__(*(self, ) + args, **keys)
  File "/home/me/clones/MattePalte--Verbify-TTS/env/lib64/python3.10/site-packages/Xlib/protocol/display.py", line 60, in __init__
    auth_name, auth_data = connect.get_auth(self.socket,
  File "/home/me/clones/MattePalte--Verbify-TTS/env/lib64/python3.10/site-packages/Xlib/support/connect.py", line 91, in get_auth
    return mod.get_auth(sock, dname, host, dno)
  File "/home/me/clones/MattePalte--Verbify-TTS/env/lib64/python3.10/site-packages/Xlib/support/unix_connect.py", line 103, in new_get_auth
    au = xauth.Xauthority()
  File "/home/me/clones/MattePalte--Verbify-TTS/env/lib64/python3.10/site-packages/Xlib/xauth.py", line 45, in __init__
    raise error.XauthError('~/.Xauthority: %s' % err)
Xlib.error.XauthError: ~/.Xauthority: [Errno 2] No such file or directory: '/home/me/.Xauthority'

This seems to be because I'm using Wayland, not Xorg.

MattePalte commented 1 year ago

I found this post which might be related: https://stackoverflow.com/questions/48103873/pip3-install-pyautogui-error-code-1

Have you tried with: pip install python-xlib?