diff --git a/.img/combination.png b/.img/combination.png new file mode 100644 index 0000000..b00c94b Binary files /dev/null and b/.img/combination.png differ diff --git a/.img/complex.png b/.img/complex.png new file mode 100644 index 0000000..008d4bc Binary files /dev/null and b/.img/complex.png differ diff --git a/.img/gui.png b/.img/gui.png new file mode 100644 index 0000000..419ddd8 Binary files /dev/null and b/.img/gui.png differ diff --git a/README.md b/README.md index 4d99824..23c90bb 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,26 @@ Linux Voice Activated Macro ## Status This project is currently a work-in-progress and is minimally functional. + +Utilising Pocketsphinx, a lightweight voice to text engine you can specify voice commands for the tool to recognise and actions to perform. + +Known bugs and planned additions +- To save and use changes click Ok on the main GUI then reload. +- Remember last loaded profile and load on start +- Log window showing spoken words the V2T recognises with ability to right click and assign voice command and actions to current profile +- Support for joysticks and gaming devices ## Requirements - python3 - PyQt5 - python3-xlib +- pocketsphinx +- swig3.0 ## Install - $ pip3 install PyQt5 - $ pip3 install python3-xlib +- $ pip3 install pocketsphinx +- $ sudo apt-get install swig3.0 +- $ sudo ln -s /usr/bin/swig3.0 /usr/bin/swig - $ git clone https://github.com/rose-jinyang/LinVAM.git ## Usage This script must be run with root privilege because it must hook and simulate input devices such as keyboard, mouse etc. @@ -16,3 +29,15 @@ This script must be run with root privilege because it must hook and simulate in - $ xhost + - $ sudo python3 ./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 +![Main GUI](https://github.com/aidygus/LinVAM/.img/gui.png) +### Key combinations +To assign key combinations first decide which functional key to press by clicking on Ctrl, Alt, Shift or Win to denote left or right key then press the actual command key +![Main GUI](https://github.com/aidygus/LinVAM/.img/combination.png) +### Complex commands +It is possible to add multiple actions to a voice command for complex macros with the ability to add a pause between each action. +You can also assign mouse movements and system commands if you require (eg opening applications such as calculator, browser etc) +![Main GUI](https://github.com/aidygus/LinVAM/.img/complex.png) +### Threshold +As a rough guide use a value of 10 for each syllable of a word then tweak it down for better accuracy. diff --git a/__pycache__/commandeditwnd.cpython-36.pyc b/__pycache__/commandeditwnd.cpython-36.pyc index c7f7850..4c4a793 100644 Binary files a/__pycache__/commandeditwnd.cpython-36.pyc and b/__pycache__/commandeditwnd.cpython-36.pyc differ diff --git a/__pycache__/keyactioneditwnd.cpython-36.pyc b/__pycache__/keyactioneditwnd.cpython-36.pyc index 16ecd91..e553be3 100644 Binary files a/__pycache__/keyactioneditwnd.cpython-36.pyc and b/__pycache__/keyactioneditwnd.cpython-36.pyc differ diff --git a/__pycache__/mouseactioneditwnd.cpython-36.pyc b/__pycache__/mouseactioneditwnd.cpython-36.pyc index f43d14e..4e3e156 100644 Binary files a/__pycache__/mouseactioneditwnd.cpython-36.pyc and b/__pycache__/mouseactioneditwnd.cpython-36.pyc differ diff --git a/__pycache__/pauseactioneditwnd.cpython-36.pyc b/__pycache__/pauseactioneditwnd.cpython-36.pyc index 3230003..1115e6b 100644 Binary files a/__pycache__/pauseactioneditwnd.cpython-36.pyc and b/__pycache__/pauseactioneditwnd.cpython-36.pyc differ diff --git a/__pycache__/profileeditwnd.cpython-36.pyc b/__pycache__/profileeditwnd.cpython-36.pyc index 3d812eb..509dc74 100644 Binary files a/__pycache__/profileeditwnd.cpython-36.pyc and b/__pycache__/profileeditwnd.cpython-36.pyc differ diff --git a/__pycache__/profileexecutor.cpython-36.pyc b/__pycache__/profileexecutor.cpython-36.pyc index 2a9110b..40b7ed1 100644 Binary files a/__pycache__/profileexecutor.cpython-36.pyc and b/__pycache__/profileexecutor.cpython-36.pyc differ diff --git a/__pycache__/ui_commandeditwnd.cpython-36.pyc b/__pycache__/ui_commandeditwnd.cpython-36.pyc index 3a95ee9..37bc77c 100644 Binary files a/__pycache__/ui_commandeditwnd.cpython-36.pyc and b/__pycache__/ui_commandeditwnd.cpython-36.pyc differ diff --git a/__pycache__/ui_keyactioneditwnd.cpython-36.pyc b/__pycache__/ui_keyactioneditwnd.cpython-36.pyc index 5cce5d4..1e81d8a 100644 Binary files a/__pycache__/ui_keyactioneditwnd.cpython-36.pyc and b/__pycache__/ui_keyactioneditwnd.cpython-36.pyc differ diff --git a/__pycache__/ui_mainwnd.cpython-36.pyc b/__pycache__/ui_mainwnd.cpython-36.pyc index 4ca7ae2..8aa58f4 100644 Binary files a/__pycache__/ui_mainwnd.cpython-36.pyc and b/__pycache__/ui_mainwnd.cpython-36.pyc differ diff --git a/__pycache__/ui_mouseactioneditwnd.cpython-36.pyc b/__pycache__/ui_mouseactioneditwnd.cpython-36.pyc index fbc4a56..eaee1e7 100644 Binary files a/__pycache__/ui_mouseactioneditwnd.cpython-36.pyc and b/__pycache__/ui_mouseactioneditwnd.cpython-36.pyc differ diff --git a/__pycache__/ui_pauseactioneditwnd.cpython-36.pyc b/__pycache__/ui_pauseactioneditwnd.cpython-36.pyc index eaf7723..2818b62 100644 Binary files a/__pycache__/ui_pauseactioneditwnd.cpython-36.pyc and b/__pycache__/ui_pauseactioneditwnd.cpython-36.pyc differ diff --git a/__pycache__/ui_profileeditwnd.cpython-36.pyc b/__pycache__/ui_profileeditwnd.cpython-36.pyc index 998494c..83fe348 100644 Binary files a/__pycache__/ui_profileeditwnd.cpython-36.pyc and b/__pycache__/ui_profileeditwnd.cpython-36.pyc differ diff --git a/command.list b/command.list index 135c18d..044b003 100644 --- a/command.list +++ b/command.list @@ -1,5 +1,37 @@ -go /1e-2/ -back /1e-3/ -left /1e-10/ -right /1e-3/ -stop /1e-8/ \ No newline at end of file +victor recall ship /1e-40/ +victor cargo scoop /1e-45/ +victor balance power /1e-40/ +victor power to weapons /1e-45/ +victor power to engines /1e-55/ +victor power to shields /1e-50/ +recall fighter /1e-40/ +fighter defend me /1e-50/ +fighter attack target /1e-60/ +fighter engage at will /1e-60/ +fighter maintain formation /1e-70/ +fighter hold position /1e-60/ +victor hand brake /1e-30/ +victor headlights /1e-40/ +toggle turret mode /1e-40/ +next fire group /1e-40/ +previous fire group /1e-60/ +switch hud mode /1e-30/ +toggle night vision /1e-40/ +toggle orbital lines /1e-50/ +verity full speed /1e-20/ +approach speed /1e-20/ +full stop /1e-20/ +target next system /1e-50/ +target highest threat /1e-50/ +next hostile target /1e-50/ +previous hostile target /1e-70/ +cycle next target /1e-50/ +cycle previous target /1e-70/ +victor full beams /1e-40/ +target first wingman /1e-45/ +target second wingman /1e-50/ +target third wingman /1e-45/ +select wing target /1e-50/ +target next subsystem /1e-50/ +target previous subsystem /1e-70/ +wingman nav lock /1e-35/ \ No newline at end of file diff --git a/keyboard/__pycache__/__init__.cpython-36.pyc b/keyboard/__pycache__/__init__.cpython-36.pyc index 72aa11a..da8e111 100644 Binary files a/keyboard/__pycache__/__init__.cpython-36.pyc and b/keyboard/__pycache__/__init__.cpython-36.pyc differ diff --git a/keyboard/__pycache__/_canonical_names.cpython-36.pyc b/keyboard/__pycache__/_canonical_names.cpython-36.pyc index 77a2f90..73348d8 100644 Binary files a/keyboard/__pycache__/_canonical_names.cpython-36.pyc and b/keyboard/__pycache__/_canonical_names.cpython-36.pyc differ diff --git a/keyboard/__pycache__/_generic.cpython-36.pyc b/keyboard/__pycache__/_generic.cpython-36.pyc index e07e1f9..b7a1a4e 100644 Binary files a/keyboard/__pycache__/_generic.cpython-36.pyc and b/keyboard/__pycache__/_generic.cpython-36.pyc differ diff --git a/keyboard/__pycache__/_keyboard_event.cpython-36.pyc b/keyboard/__pycache__/_keyboard_event.cpython-36.pyc index 47fb9d5..f533b6f 100644 Binary files a/keyboard/__pycache__/_keyboard_event.cpython-36.pyc and b/keyboard/__pycache__/_keyboard_event.cpython-36.pyc differ diff --git a/keyboard/__pycache__/_nixcommon.cpython-36.pyc b/keyboard/__pycache__/_nixcommon.cpython-36.pyc index ca5d3bd..8a62f00 100644 Binary files a/keyboard/__pycache__/_nixcommon.cpython-36.pyc and b/keyboard/__pycache__/_nixcommon.cpython-36.pyc differ diff --git a/keyboard/__pycache__/_nixkeyboard.cpython-36.pyc b/keyboard/__pycache__/_nixkeyboard.cpython-36.pyc index a0fa00b..d2a6529 100644 Binary files a/keyboard/__pycache__/_nixkeyboard.cpython-36.pyc and b/keyboard/__pycache__/_nixkeyboard.cpython-36.pyc differ diff --git a/profiles.dat b/profiles.dat index a6d10cc..3171446 100644 Binary files a/profiles.dat and b/profiles.dat differ diff --git a/pynput/__pycache__/__init__.cpython-36.pyc b/pynput/__pycache__/__init__.cpython-36.pyc index 930e817..55e16e2 100644 Binary files a/pynput/__pycache__/__init__.cpython-36.pyc and b/pynput/__pycache__/__init__.cpython-36.pyc differ diff --git a/pynput/_util/__pycache__/__init__.cpython-36.pyc b/pynput/_util/__pycache__/__init__.cpython-36.pyc index 552454f..7839212 100644 Binary files a/pynput/_util/__pycache__/__init__.cpython-36.pyc and b/pynput/_util/__pycache__/__init__.cpython-36.pyc differ diff --git a/pynput/_util/__pycache__/xorg.cpython-36.pyc b/pynput/_util/__pycache__/xorg.cpython-36.pyc index 4c58543..25d5aa4 100644 Binary files a/pynput/_util/__pycache__/xorg.cpython-36.pyc and b/pynput/_util/__pycache__/xorg.cpython-36.pyc differ diff --git a/pynput/_util/__pycache__/xorg_keysyms.cpython-36.pyc b/pynput/_util/__pycache__/xorg_keysyms.cpython-36.pyc index 5aabe76..0df0bc3 100644 Binary files a/pynput/_util/__pycache__/xorg_keysyms.cpython-36.pyc and b/pynput/_util/__pycache__/xorg_keysyms.cpython-36.pyc differ diff --git a/pynput/mouse/__pycache__/__init__.cpython-36.pyc b/pynput/mouse/__pycache__/__init__.cpython-36.pyc index cf85f8a..cbbb9ba 100644 Binary files a/pynput/mouse/__pycache__/__init__.cpython-36.pyc and b/pynput/mouse/__pycache__/__init__.cpython-36.pyc differ diff --git a/pynput/mouse/__pycache__/_base.cpython-36.pyc b/pynput/mouse/__pycache__/_base.cpython-36.pyc index 22b9d30..e83e3b2 100644 Binary files a/pynput/mouse/__pycache__/_base.cpython-36.pyc and b/pynput/mouse/__pycache__/_base.cpython-36.pyc differ diff --git a/pynput/mouse/__pycache__/_xorg.cpython-36.pyc b/pynput/mouse/__pycache__/_xorg.cpython-36.pyc index 00e1d5f..214c858 100644 Binary files a/pynput/mouse/__pycache__/_xorg.cpython-36.pyc and b/pynput/mouse/__pycache__/_xorg.cpython-36.pyc differ