savbell / whisper-writer

💬📝 A small dictation app using OpenAI's Whisper speech recognition model.
GNU General Public License v3.0
244 stars 40 forks source link

"You must be root" #42

Closed faspie closed 1 month ago

faspie commented 1 month ago

Error on startup: "You must be root"

Starting WhisperWriter... Script activated. Whisper is set to run using OpenAI's API. To change this, modify the "use_api" value in the src\config.json file. WhisperWriter is set to record using voice_activity_detection. To change this, modify the "recording_mode" value in the src\config.json file. The activation key combo is set to Ctrl+Shift+Space. When it is pressed, recording will start, and will stop when you stop speaking. Press Ctrl+C on the terminal window to quit. Traceback (most recent call last): File "/home/fabian/whisper-writer/src/main.py", line 141, in keyboard.add_hotkey(config['activation_key'], on_shortcut) File "/home/fabian/whisper-writer/venv/lib/python3.10/site-packages/keyboard/init.py", line 639, in add_hotkey _listener.start_if_necessary() File "/home/fabian/whisper-writer/venv/lib/python3.10/site-packages/keyboard/_generic.py", line 35, in start_if_necessary self.init() File "/home/fabian/whisper-writer/venv/lib/python3.10/site-packages/keyboard/init.py", line 196, in init _os_keyboard.init() File "/home/fabian/whisper-writer/venv/lib/python3.10/site-packages/keyboard/_nixkeyboard.py", line 113, in init build_device() File "/home/fabian/whisper-writer/venv/lib/python3.10/site-packages/keyboard/_nixkeyboard.py", line 109, in build_device ensure_root() File "/home/fabian/whisper-writer/venv/lib/python3.10/site-packages/keyboard/_nixcommon.py", line 174, in ensure_root raise ImportError('You must be root to use this library on linux.') ImportError: You must be root to use this library on linux.

savbell commented 1 month ago

Hi, thanks for the bug report! I've just released a major rewrite of the application which removed dependency on the keyboard package. This should solve the issue.

Something else I noticed is that you are running the application using Python 3.10. I would recommend using Python 3.11, since that is the version the app was written for. I do not know if all the packages are compatible with Python 3.10, so you may run into more issues there.

Cheers, Sav