diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..6d53234 --- /dev/null +++ b/.gitignore @@ -0,0 +1,131 @@ + +# Created by https://www.gitignore.io/api/python +# Edit at https://www.gitignore.io/?templates=python + +### Python ### +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +pip-wheel-metadata/ +share/python-wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.nox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +.python-version + +# pipenv +# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. +# However, in case of collaboration, if having platform-specific dependencies or dependencies +# having no cross-platform support, pipenv may install dependencies that don’t work, or not +# install all needed dependencies. +#Pipfile.lock + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ +.dmypy.json +dmypy.json + +# Pyre type checker +.pyre/ + +# End of https://www.gitignore.io/api/python + diff --git a/.img/combination.png b/.img/combination.png index b00c94b..53d94d0 100644 Binary files a/.img/combination.png and b/.img/combination.png differ diff --git a/.img/complex.png b/.img/complex.png index 008d4bc..1ee63ad 100644 Binary files a/.img/complex.png and b/.img/complex.png differ diff --git a/.img/gui.png b/.img/gui.png index 419ddd8..91b01f0 100644 Binary files a/.img/gui.png and b/.img/gui.png differ diff --git a/README.md b/README.md index 2cc1f4a..f6ef32c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # LinVAM Linux Voice Activated Macro ## Status -This project is currently a work-in-progress and is minimally functional. +This project is currently a work-in-progress and is minimally functional only for english. Utilising Pocketsphinx, a lightweight voice to text engine you can specify voice commands for the tool to recognise and actions to perform. @@ -19,6 +19,7 @@ Known bugs and planned additions ## Install - $ pip3 install PyQt5 - $ pip3 install python3-xlib +- $ pip3 install pyaudio - $ pip3 install pocketsphinx - $ sudo apt-get install swig3.0 - $ sudo ln -s /usr/bin/swig3.0 /usr/bin/swig @@ -27,7 +28,7 @@ Known bugs and planned additions This script must be run with root privilege because it must hook and simulate input devices such as keyboard, mouse etc. - $ cd LinVAM - $ xhost + -- $ sudo python3 ./main.py +- $ sudo ./main.py ### Profiles Multiple profiles are supported. To create a new profile for a specific task/game click new and the main profile editor window will be displayed diff --git a/__pycache__/commandeditwnd.cpython-36.pyc b/__pycache__/commandeditwnd.cpython-36.pyc deleted file mode 100644 index 4c4a793..0000000 Binary files a/__pycache__/commandeditwnd.cpython-36.pyc and /dev/null differ diff --git a/__pycache__/keyactioneditwnd.cpython-36.pyc b/__pycache__/keyactioneditwnd.cpython-36.pyc deleted file mode 100644 index e553be3..0000000 Binary files a/__pycache__/keyactioneditwnd.cpython-36.pyc and /dev/null differ diff --git a/__pycache__/mouseactioneditwnd.cpython-36.pyc b/__pycache__/mouseactioneditwnd.cpython-36.pyc deleted file mode 100644 index 4e3e156..0000000 Binary files a/__pycache__/mouseactioneditwnd.cpython-36.pyc and /dev/null differ diff --git a/__pycache__/pauseactioneditwnd.cpython-36.pyc b/__pycache__/pauseactioneditwnd.cpython-36.pyc deleted file mode 100644 index 1115e6b..0000000 Binary files a/__pycache__/pauseactioneditwnd.cpython-36.pyc and /dev/null differ diff --git a/__pycache__/profileeditwnd.cpython-36.pyc b/__pycache__/profileeditwnd.cpython-36.pyc deleted file mode 100644 index 509dc74..0000000 Binary files a/__pycache__/profileeditwnd.cpython-36.pyc and /dev/null differ diff --git a/__pycache__/profileexecutor.cpython-36.pyc b/__pycache__/profileexecutor.cpython-36.pyc deleted file mode 100644 index 40b7ed1..0000000 Binary files a/__pycache__/profileexecutor.cpython-36.pyc and /dev/null differ diff --git a/__pycache__/ui_commandeditwnd.cpython-36.pyc b/__pycache__/ui_commandeditwnd.cpython-36.pyc deleted file mode 100644 index 37bc77c..0000000 Binary files a/__pycache__/ui_commandeditwnd.cpython-36.pyc and /dev/null differ diff --git a/__pycache__/ui_keyactioneditwnd.cpython-36.pyc b/__pycache__/ui_keyactioneditwnd.cpython-36.pyc deleted file mode 100644 index 1e81d8a..0000000 Binary files a/__pycache__/ui_keyactioneditwnd.cpython-36.pyc and /dev/null differ diff --git a/__pycache__/ui_mainwnd.cpython-36.pyc b/__pycache__/ui_mainwnd.cpython-36.pyc deleted file mode 100644 index 8aa58f4..0000000 Binary files a/__pycache__/ui_mainwnd.cpython-36.pyc and /dev/null differ diff --git a/__pycache__/ui_mouseactioneditwnd.cpython-36.pyc b/__pycache__/ui_mouseactioneditwnd.cpython-36.pyc deleted file mode 100644 index eaee1e7..0000000 Binary files a/__pycache__/ui_mouseactioneditwnd.cpython-36.pyc and /dev/null differ diff --git a/__pycache__/ui_pauseactioneditwnd.cpython-36.pyc b/__pycache__/ui_pauseactioneditwnd.cpython-36.pyc deleted file mode 100644 index 2818b62..0000000 Binary files a/__pycache__/ui_pauseactioneditwnd.cpython-36.pyc and /dev/null differ diff --git a/__pycache__/ui_profileeditwnd.cpython-36.pyc b/__pycache__/ui_profileeditwnd.cpython-36.pyc deleted file mode 100644 index 83fe348..0000000 Binary files a/__pycache__/ui_profileeditwnd.cpython-36.pyc and /dev/null differ diff --git a/keyboard/__pycache__/__init__.cpython-36.pyc b/keyboard/__pycache__/__init__.cpython-36.pyc deleted file mode 100644 index da8e111..0000000 Binary files a/keyboard/__pycache__/__init__.cpython-36.pyc and /dev/null differ diff --git a/keyboard/__pycache__/_canonical_names.cpython-36.pyc b/keyboard/__pycache__/_canonical_names.cpython-36.pyc deleted file mode 100644 index 73348d8..0000000 Binary files a/keyboard/__pycache__/_canonical_names.cpython-36.pyc and /dev/null differ diff --git a/keyboard/__pycache__/_generic.cpython-36.pyc b/keyboard/__pycache__/_generic.cpython-36.pyc deleted file mode 100644 index b7a1a4e..0000000 Binary files a/keyboard/__pycache__/_generic.cpython-36.pyc and /dev/null differ diff --git a/keyboard/__pycache__/_keyboard_event.cpython-36.pyc b/keyboard/__pycache__/_keyboard_event.cpython-36.pyc deleted file mode 100644 index f533b6f..0000000 Binary files a/keyboard/__pycache__/_keyboard_event.cpython-36.pyc and /dev/null differ diff --git a/keyboard/__pycache__/_nixcommon.cpython-36.pyc b/keyboard/__pycache__/_nixcommon.cpython-36.pyc deleted file mode 100644 index 8a62f00..0000000 Binary files a/keyboard/__pycache__/_nixcommon.cpython-36.pyc and /dev/null differ diff --git a/keyboard/__pycache__/_nixkeyboard.cpython-36.pyc b/keyboard/__pycache__/_nixkeyboard.cpython-36.pyc deleted file mode 100644 index d2a6529..0000000 Binary files a/keyboard/__pycache__/_nixkeyboard.cpython-36.pyc and /dev/null differ diff --git a/keyboard/__pycache__/_winkeyboard.cpython-36.pyc b/keyboard/__pycache__/_winkeyboard.cpython-36.pyc deleted file mode 100644 index 8547f03..0000000 Binary files a/keyboard/__pycache__/_winkeyboard.cpython-36.pyc and /dev/null differ diff --git a/main.py b/main.py old mode 100644 new mode 100755 index 24fa6ac..992bb00 --- a/main.py +++ b/main.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import * @@ -10,6 +11,7 @@ import pickle import time import keyboard import threading +import signal class MainWnd(QWidget): def __init__(self, p_parent = None): @@ -25,6 +27,7 @@ class MainWnd(QWidget): self.ui.listeningChk.stateChanged.connect(self.slotListeningEnabled) self.ui.ok.clicked.connect(self.slotOK) self.ui.cancel.clicked.connect(self.slotCancel) + signal.signal(signal.SIGINT, signal.SIG_DFL) if self.loadFromDatabase() > 0 : # if self.loadTestProfiles() > 0: diff --git a/pynput/__pycache__/__init__.cpython-36.pyc b/pynput/__pycache__/__init__.cpython-36.pyc deleted file mode 100644 index 55e16e2..0000000 Binary files a/pynput/__pycache__/__init__.cpython-36.pyc and /dev/null differ