Linux Voice Activated Macro
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

105 lines
5.2 KiB

3 years ago
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwnd.ui'
#
Fixes & implementation of playing audio files. See changes.md for details. - hacked profileexcutor to reload command list when changing it. it did not do that, so changing the profile had no effect at all. - hacked profileexecutor to somewhat make use of "Enable listening". It was an option without functionality at all until now. - created new directory 'voicepacks', copy HCS voicepacks here - new command to play a sound - new gui to select sounds from voicepacks - created playsound class that reads voicepack files and plays audio files with ffplay - added alternate keypress handling using xdotool, which won't require root privileges. might not work for any key existing in profiles, as some need to be remapped. added some remappings to profileexecutor.py pressKey() - added basic command line argument reading to set some configs. right now there: -noroot - will enable xdotool usage for keypresses -xdowindowid <windowid> - will send keypresses to this window only, makes it more relyable when window is not focused for any reason - added auto-detection of Elite Dangerous client window id if -noroot is used and no -xdowindowid is supplied. for this to work, start this script AFTER the client is already running. - monkey-wrenched a volume slider to the main window - added confirmation dialog for removing a profile (!) - copy existing profile. added a copy button to the main menu - properly shutdown audio recording stream - updated gitignore to ignore audio files
2 years ago
# Created by: PyQt5 UI code generator 5.14.2
3 years ago
#
# WARNING! All changes made in this file will be lost!
Fixes & implementation of playing audio files. See changes.md for details. - hacked profileexcutor to reload command list when changing it. it did not do that, so changing the profile had no effect at all. - hacked profileexecutor to somewhat make use of "Enable listening". It was an option without functionality at all until now. - created new directory 'voicepacks', copy HCS voicepacks here - new command to play a sound - new gui to select sounds from voicepacks - created playsound class that reads voicepack files and plays audio files with ffplay - added alternate keypress handling using xdotool, which won't require root privileges. might not work for any key existing in profiles, as some need to be remapped. added some remappings to profileexecutor.py pressKey() - added basic command line argument reading to set some configs. right now there: -noroot - will enable xdotool usage for keypresses -xdowindowid <windowid> - will send keypresses to this window only, makes it more relyable when window is not focused for any reason - added auto-detection of Elite Dangerous client window id if -noroot is used and no -xdowindowid is supplied. for this to work, start this script AFTER the client is already running. - monkey-wrenched a volume slider to the main window - added confirmation dialog for removing a profile (!) - copy existing profile. added a copy button to the main menu - properly shutdown audio recording stream - updated gitignore to ignore audio files
2 years ago
3 years ago
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWidget(object):
def setupUi(self, MainWidget):
MainWidget.setObjectName("MainWidget")
MainWidget.resize(820, 166)
font = QtGui.QFont()
font.setPointSize(10)
MainWidget.setFont(font)
self.gridLayout_2 = QtWidgets.QGridLayout(MainWidget)
self.gridLayout_2.setContentsMargins(-1, 20, -1, -1)
self.gridLayout_2.setVerticalSpacing(20)
self.gridLayout_2.setObjectName("gridLayout_2")
self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
self.horizontalLayout_2.setSpacing(20)
self.horizontalLayout_2.setObjectName("horizontalLayout_2")
self.listeningChk = QtWidgets.QCheckBox(MainWidget)
self.listeningChk.setObjectName("listeningChk")
self.horizontalLayout_2.addWidget(self.listeningChk)
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem)
Fixes & implementation of playing audio files. See changes.md for details. - hacked profileexcutor to reload command list when changing it. it did not do that, so changing the profile had no effect at all. - hacked profileexecutor to somewhat make use of "Enable listening". It was an option without functionality at all until now. - created new directory 'voicepacks', copy HCS voicepacks here - new command to play a sound - new gui to select sounds from voicepacks - created playsound class that reads voicepack files and plays audio files with ffplay - added alternate keypress handling using xdotool, which won't require root privileges. might not work for any key existing in profiles, as some need to be remapped. added some remappings to profileexecutor.py pressKey() - added basic command line argument reading to set some configs. right now there: -noroot - will enable xdotool usage for keypresses -xdowindowid <windowid> - will send keypresses to this window only, makes it more relyable when window is not focused for any reason - added auto-detection of Elite Dangerous client window id if -noroot is used and no -xdowindowid is supplied. for this to work, start this script AFTER the client is already running. - monkey-wrenched a volume slider to the main window - added confirmation dialog for removing a profile (!) - copy existing profile. added a copy button to the main menu - properly shutdown audio recording stream - updated gitignore to ignore audio files
2 years ago
self.groupBox = QtWidgets.QGroupBox(MainWidget)
self.groupBox.setMinimumSize(QtCore.QSize(200, 42))
Fixes & implementation of playing audio files. See changes.md for details. - hacked profileexcutor to reload command list when changing it. it did not do that, so changing the profile had no effect at all. - hacked profileexecutor to somewhat make use of "Enable listening". It was an option without functionality at all until now. - created new directory 'voicepacks', copy HCS voicepacks here - new command to play a sound - new gui to select sounds from voicepacks - created playsound class that reads voicepack files and plays audio files with ffplay - added alternate keypress handling using xdotool, which won't require root privileges. might not work for any key existing in profiles, as some need to be remapped. added some remappings to profileexecutor.py pressKey() - added basic command line argument reading to set some configs. right now there: -noroot - will enable xdotool usage for keypresses -xdowindowid <windowid> - will send keypresses to this window only, makes it more relyable when window is not focused for any reason - added auto-detection of Elite Dangerous client window id if -noroot is used and no -xdowindowid is supplied. for this to work, start this script AFTER the client is already running. - monkey-wrenched a volume slider to the main window - added confirmation dialog for removing a profile (!) - copy existing profile. added a copy button to the main menu - properly shutdown audio recording stream - updated gitignore to ignore audio files
2 years ago
self.groupBox.setAlignment(QtCore.Qt.AlignCenter)
self.groupBox.setObjectName("groupBox")
self.sliderVolume = QtWidgets.QSlider(self.groupBox)
self.sliderVolume.setGeometry(QtCore.QRect(10, 20, 181, 21))
self.sliderVolume.setMaximum(100)
self.sliderVolume.setProperty("value", 100)
self.sliderVolume.setOrientation(QtCore.Qt.Horizontal)
self.sliderVolume.setObjectName("sliderVolume")
self.horizontalLayout_2.addWidget(self.groupBox)
spacerItem1 = QtWidgets.QSpacerItem(20, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem1)
3 years ago
self.ok = QtWidgets.QPushButton(MainWidget)
self.ok.setMinimumSize(QtCore.QSize(130, 0))
self.ok.setObjectName("ok")
self.horizontalLayout_2.addWidget(self.ok)
self.cancel = QtWidgets.QPushButton(MainWidget)
self.cancel.setMinimumSize(QtCore.QSize(130, 0))
self.cancel.setObjectName("cancel")
self.horizontalLayout_2.addWidget(self.cancel)
Fixes & implementation of playing audio files. See changes.md for details. - hacked profileexcutor to reload command list when changing it. it did not do that, so changing the profile had no effect at all. - hacked profileexecutor to somewhat make use of "Enable listening". It was an option without functionality at all until now. - created new directory 'voicepacks', copy HCS voicepacks here - new command to play a sound - new gui to select sounds from voicepacks - created playsound class that reads voicepack files and plays audio files with ffplay - added alternate keypress handling using xdotool, which won't require root privileges. might not work for any key existing in profiles, as some need to be remapped. added some remappings to profileexecutor.py pressKey() - added basic command line argument reading to set some configs. right now there: -noroot - will enable xdotool usage for keypresses -xdowindowid <windowid> - will send keypresses to this window only, makes it more relyable when window is not focused for any reason - added auto-detection of Elite Dangerous client window id if -noroot is used and no -xdowindowid is supplied. for this to work, start this script AFTER the client is already running. - monkey-wrenched a volume slider to the main window - added confirmation dialog for removing a profile (!) - copy existing profile. added a copy button to the main menu - properly shutdown audio recording stream - updated gitignore to ignore audio files
2 years ago
self.gridLayout_2.addLayout(self.horizontalLayout_2, 2, 0, 1, 1)
3 years ago
self.horizontalLayout = QtWidgets.QHBoxLayout()
self.horizontalLayout.setSpacing(20)
self.horizontalLayout.setObjectName("horizontalLayout")
self.label = QtWidgets.QLabel(MainWidget)
Fixes & implementation of playing audio files. See changes.md for details. - hacked profileexcutor to reload command list when changing it. it did not do that, so changing the profile had no effect at all. - hacked profileexecutor to somewhat make use of "Enable listening". It was an option without functionality at all until now. - created new directory 'voicepacks', copy HCS voicepacks here - new command to play a sound - new gui to select sounds from voicepacks - created playsound class that reads voicepack files and plays audio files with ffplay - added alternate keypress handling using xdotool, which won't require root privileges. might not work for any key existing in profiles, as some need to be remapped. added some remappings to profileexecutor.py pressKey() - added basic command line argument reading to set some configs. right now there: -noroot - will enable xdotool usage for keypresses -xdowindowid <windowid> - will send keypresses to this window only, makes it more relyable when window is not focused for any reason - added auto-detection of Elite Dangerous client window id if -noroot is used and no -xdowindowid is supplied. for this to work, start this script AFTER the client is already running. - monkey-wrenched a volume slider to the main window - added confirmation dialog for removing a profile (!) - copy existing profile. added a copy button to the main menu - properly shutdown audio recording stream - updated gitignore to ignore audio files
2 years ago
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.label.sizePolicy().hasHeightForWidth())
self.label.setSizePolicy(sizePolicy)
3 years ago
self.label.setMinimumSize(QtCore.QSize(60, 0))
self.label.setObjectName("label")
self.horizontalLayout.addWidget(self.label)
self.profileCbx = QtWidgets.QComboBox(MainWidget)
Fixes & implementation of playing audio files. See changes.md for details. - hacked profileexcutor to reload command list when changing it. it did not do that, so changing the profile had no effect at all. - hacked profileexecutor to somewhat make use of "Enable listening". It was an option without functionality at all until now. - created new directory 'voicepacks', copy HCS voicepacks here - new command to play a sound - new gui to select sounds from voicepacks - created playsound class that reads voicepack files and plays audio files with ffplay - added alternate keypress handling using xdotool, which won't require root privileges. might not work for any key existing in profiles, as some need to be remapped. added some remappings to profileexecutor.py pressKey() - added basic command line argument reading to set some configs. right now there: -noroot - will enable xdotool usage for keypresses -xdowindowid <windowid> - will send keypresses to this window only, makes it more relyable when window is not focused for any reason - added auto-detection of Elite Dangerous client window id if -noroot is used and no -xdowindowid is supplied. for this to work, start this script AFTER the client is already running. - monkey-wrenched a volume slider to the main window - added confirmation dialog for removing a profile (!) - copy existing profile. added a copy button to the main menu - properly shutdown audio recording stream - updated gitignore to ignore audio files
2 years ago
self.profileCbx.setMinimumSize(QtCore.QSize(300, 0))
3 years ago
self.profileCbx.setObjectName("profileCbx")
self.horizontalLayout.addWidget(self.profileCbx)
self.addBut = QtWidgets.QPushButton(MainWidget)
Fixes & implementation of playing audio files. See changes.md for details. - hacked profileexcutor to reload command list when changing it. it did not do that, so changing the profile had no effect at all. - hacked profileexecutor to somewhat make use of "Enable listening". It was an option without functionality at all until now. - created new directory 'voicepacks', copy HCS voicepacks here - new command to play a sound - new gui to select sounds from voicepacks - created playsound class that reads voicepack files and plays audio files with ffplay - added alternate keypress handling using xdotool, which won't require root privileges. might not work for any key existing in profiles, as some need to be remapped. added some remappings to profileexecutor.py pressKey() - added basic command line argument reading to set some configs. right now there: -noroot - will enable xdotool usage for keypresses -xdowindowid <windowid> - will send keypresses to this window only, makes it more relyable when window is not focused for any reason - added auto-detection of Elite Dangerous client window id if -noroot is used and no -xdowindowid is supplied. for this to work, start this script AFTER the client is already running. - monkey-wrenched a volume slider to the main window - added confirmation dialog for removing a profile (!) - copy existing profile. added a copy button to the main menu - properly shutdown audio recording stream - updated gitignore to ignore audio files
2 years ago
self.addBut.setMinimumSize(QtCore.QSize(75, 0))
3 years ago
self.addBut.setObjectName("addBut")
self.horizontalLayout.addWidget(self.addBut)
self.editBut = QtWidgets.QPushButton(MainWidget)
Fixes & implementation of playing audio files. See changes.md for details. - hacked profileexcutor to reload command list when changing it. it did not do that, so changing the profile had no effect at all. - hacked profileexecutor to somewhat make use of "Enable listening". It was an option without functionality at all until now. - created new directory 'voicepacks', copy HCS voicepacks here - new command to play a sound - new gui to select sounds from voicepacks - created playsound class that reads voicepack files and plays audio files with ffplay - added alternate keypress handling using xdotool, which won't require root privileges. might not work for any key existing in profiles, as some need to be remapped. added some remappings to profileexecutor.py pressKey() - added basic command line argument reading to set some configs. right now there: -noroot - will enable xdotool usage for keypresses -xdowindowid <windowid> - will send keypresses to this window only, makes it more relyable when window is not focused for any reason - added auto-detection of Elite Dangerous client window id if -noroot is used and no -xdowindowid is supplied. for this to work, start this script AFTER the client is already running. - monkey-wrenched a volume slider to the main window - added confirmation dialog for removing a profile (!) - copy existing profile. added a copy button to the main menu - properly shutdown audio recording stream - updated gitignore to ignore audio files
2 years ago
self.editBut.setMinimumSize(QtCore.QSize(75, 0))
3 years ago
self.editBut.setObjectName("editBut")
self.horizontalLayout.addWidget(self.editBut)
Fixes & implementation of playing audio files. See changes.md for details. - hacked profileexcutor to reload command list when changing it. it did not do that, so changing the profile had no effect at all. - hacked profileexecutor to somewhat make use of "Enable listening". It was an option without functionality at all until now. - created new directory 'voicepacks', copy HCS voicepacks here - new command to play a sound - new gui to select sounds from voicepacks - created playsound class that reads voicepack files and plays audio files with ffplay - added alternate keypress handling using xdotool, which won't require root privileges. might not work for any key existing in profiles, as some need to be remapped. added some remappings to profileexecutor.py pressKey() - added basic command line argument reading to set some configs. right now there: -noroot - will enable xdotool usage for keypresses -xdowindowid <windowid> - will send keypresses to this window only, makes it more relyable when window is not focused for any reason - added auto-detection of Elite Dangerous client window id if -noroot is used and no -xdowindowid is supplied. for this to work, start this script AFTER the client is already running. - monkey-wrenched a volume slider to the main window - added confirmation dialog for removing a profile (!) - copy existing profile. added a copy button to the main menu - properly shutdown audio recording stream - updated gitignore to ignore audio files
2 years ago
self.copyBut = QtWidgets.QPushButton(MainWidget)
self.copyBut.setMinimumSize(QtCore.QSize(75, 0))
self.copyBut.setObjectName("copyBut")
self.horizontalLayout.addWidget(self.copyBut)
3 years ago
self.removeBut = QtWidgets.QPushButton(MainWidget)
Fixes & implementation of playing audio files. See changes.md for details. - hacked profileexcutor to reload command list when changing it. it did not do that, so changing the profile had no effect at all. - hacked profileexecutor to somewhat make use of "Enable listening". It was an option without functionality at all until now. - created new directory 'voicepacks', copy HCS voicepacks here - new command to play a sound - new gui to select sounds from voicepacks - created playsound class that reads voicepack files and plays audio files with ffplay - added alternate keypress handling using xdotool, which won't require root privileges. might not work for any key existing in profiles, as some need to be remapped. added some remappings to profileexecutor.py pressKey() - added basic command line argument reading to set some configs. right now there: -noroot - will enable xdotool usage for keypresses -xdowindowid <windowid> - will send keypresses to this window only, makes it more relyable when window is not focused for any reason - added auto-detection of Elite Dangerous client window id if -noroot is used and no -xdowindowid is supplied. for this to work, start this script AFTER the client is already running. - monkey-wrenched a volume slider to the main window - added confirmation dialog for removing a profile (!) - copy existing profile. added a copy button to the main menu - properly shutdown audio recording stream - updated gitignore to ignore audio files
2 years ago
self.removeBut.setMinimumSize(QtCore.QSize(75, 0))
3 years ago
self.removeBut.setObjectName("removeBut")
self.horizontalLayout.addWidget(self.removeBut)
Fixes & implementation of playing audio files. See changes.md for details. - hacked profileexcutor to reload command list when changing it. it did not do that, so changing the profile had no effect at all. - hacked profileexecutor to somewhat make use of "Enable listening". It was an option without functionality at all until now. - created new directory 'voicepacks', copy HCS voicepacks here - new command to play a sound - new gui to select sounds from voicepacks - created playsound class that reads voicepack files and plays audio files with ffplay - added alternate keypress handling using xdotool, which won't require root privileges. might not work for any key existing in profiles, as some need to be remapped. added some remappings to profileexecutor.py pressKey() - added basic command line argument reading to set some configs. right now there: -noroot - will enable xdotool usage for keypresses -xdowindowid <windowid> - will send keypresses to this window only, makes it more relyable when window is not focused for any reason - added auto-detection of Elite Dangerous client window id if -noroot is used and no -xdowindowid is supplied. for this to work, start this script AFTER the client is already running. - monkey-wrenched a volume slider to the main window - added confirmation dialog for removing a profile (!) - copy existing profile. added a copy button to the main menu - properly shutdown audio recording stream - updated gitignore to ignore audio files
2 years ago
self.gridLayout_2.addLayout(self.horizontalLayout, 1, 0, 1, 1)
3 years ago
self.retranslateUi(MainWidget)
QtCore.QMetaObject.connectSlotsByName(MainWidget)
def retranslateUi(self, MainWidget):
_translate = QtCore.QCoreApplication.translate
MainWidget.setWindowTitle(_translate("MainWidget", "LinVAM"))
self.listeningChk.setText(_translate("MainWidget", "Enable Listening"))
Fixes & implementation of playing audio files. See changes.md for details. - hacked profileexcutor to reload command list when changing it. it did not do that, so changing the profile had no effect at all. - hacked profileexecutor to somewhat make use of "Enable listening". It was an option without functionality at all until now. - created new directory 'voicepacks', copy HCS voicepacks here - new command to play a sound - new gui to select sounds from voicepacks - created playsound class that reads voicepack files and plays audio files with ffplay - added alternate keypress handling using xdotool, which won't require root privileges. might not work for any key existing in profiles, as some need to be remapped. added some remappings to profileexecutor.py pressKey() - added basic command line argument reading to set some configs. right now there: -noroot - will enable xdotool usage for keypresses -xdowindowid <windowid> - will send keypresses to this window only, makes it more relyable when window is not focused for any reason - added auto-detection of Elite Dangerous client window id if -noroot is used and no -xdowindowid is supplied. for this to work, start this script AFTER the client is already running. - monkey-wrenched a volume slider to the main window - added confirmation dialog for removing a profile (!) - copy existing profile. added a copy button to the main menu - properly shutdown audio recording stream - updated gitignore to ignore audio files
2 years ago
self.groupBox.setTitle(_translate("MainWidget", "Voice Volume"))
self.sliderVolume.setToolTip(_translate("MainWidget", "Change voice volume"))
3 years ago
self.ok.setText(_translate("MainWidget", "OK"))
self.cancel.setText(_translate("MainWidget", "Cancel"))
self.label.setText(_translate("MainWidget", "Profile:"))
self.addBut.setText(_translate("MainWidget", "Add"))
self.editBut.setText(_translate("MainWidget", "Edit"))
Fixes & implementation of playing audio files. See changes.md for details. - hacked profileexcutor to reload command list when changing it. it did not do that, so changing the profile had no effect at all. - hacked profileexecutor to somewhat make use of "Enable listening". It was an option without functionality at all until now. - created new directory 'voicepacks', copy HCS voicepacks here - new command to play a sound - new gui to select sounds from voicepacks - created playsound class that reads voicepack files and plays audio files with ffplay - added alternate keypress handling using xdotool, which won't require root privileges. might not work for any key existing in profiles, as some need to be remapped. added some remappings to profileexecutor.py pressKey() - added basic command line argument reading to set some configs. right now there: -noroot - will enable xdotool usage for keypresses -xdowindowid <windowid> - will send keypresses to this window only, makes it more relyable when window is not focused for any reason - added auto-detection of Elite Dangerous client window id if -noroot is used and no -xdowindowid is supplied. for this to work, start this script AFTER the client is already running. - monkey-wrenched a volume slider to the main window - added confirmation dialog for removing a profile (!) - copy existing profile. added a copy button to the main menu - properly shutdown audio recording stream - updated gitignore to ignore audio files
2 years ago
self.copyBut.setToolTip(_translate("MainWidget", "Copy currently selected profile"))
self.copyBut.setText(_translate("MainWidget", "Copy"))
3 years ago
self.removeBut.setText(_translate("MainWidget", "Remove"))