Git Product home page Git Product logo

linvam's People

Contributors

aidygus avatar mte90 avatar rose-jinyang avatar smirgol avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linvam's Issues

Invalid Sample Rate under Linux Mint w/sudo

OS: Linux Mint 20.1 Ulyssa
Python: Python 3.8.5
All python packages installed through pip3, all necessary libraries installed via apt, I have double checked they are all the latest version.

Environment established, I mostly use the -noroot flag, as I don't like handing over root control unless I need to. Unfortunately I have noticed it is less than reliable with Elite Dangerous, there will be times the script will claim it has pressed a key, but the game will not respond for some reason. This could be due to a number of issues in the script or my own proton setup, it's hard to determine.

So, I decided to attempt the root method. I followed the steps exactly, and this is the output I get:

SoundFiles: init
SoundFiles: scanning
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2642:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1089:(snd_pcm_dmix_open) unable to open slave
Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2048
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2718
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2842
Traceback (most recent call last):
  File "./main.py", line 332, in <module>
    mainWnd = MainWnd()
  File "./main.py", line 26, in __init__
    self.m_profileExecutor = ProfileExecutor(None, self)
  File "/home/nick/Downloads/git-repos/LinVAM/profileexecutor.py", line 33, in __init__
    self.m_stream = self.m_pyaudio.open(format=pyaudio.paInt16, channels=1, rate=16000, input=True)
  File "/usr/local/lib/python3.8/dist-packages/pyaudio.py", line 750, in open
    stream = Stream(self, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/pyaudio.py", line 441, in __init__
    self._stream = pa.open(**arguments)
OSError: [Errno -9997] Invalid sample rate

My instinct says this is an issue of pulseaudio not playing nice under sudo, but I haven't found a reason that would be, much less a fix.

I may create a branch on my local and attempt to fix this if I find something that looks useful, but until then, the report is here.

Unsure of what the limitations of the program are.

It is my understanding that comparable programs to this one can be set to not just recognize a word when it is said, but recognize when it is present inside another word. To give a few examples: the words "Ice" and "nICE", the words "Cop" and "COPenhagen", and the words "Line" and "GasoLINE". In some cases I'm sure that the software might recognize the command just due to the word containing the same pronunciation as the smaller word on its own. However, in many cases, like two of the previous examples, or with the words "Trophy"(Trow-Fee) and "Atrophy"(Ah-Truh-Fee), they are not exactly pronounced the same way in both instances. Is there a way for the program to still recognize those instances as saying the command word?

No module named 'pocketsphinx'

I tried to install this into a venv so I could isolate the dependencies, but either inside the venv or outside of it, I get this error:

Traceback (most recent call last):
  File "/home/dogbold/git/LinVAM/./main.py", line 6, in <module>
    from profileeditwnd import ProfileEditWnd
  File "/home/dogbold/git/LinVAM/profileeditwnd.py", line 7, in <module>
    from profileexecutor import *
  File "/home/dogbold/git/LinVAM/profileexecutor.py", line 8, in <module>
    from pocketsphinx.pocketsphinx import *
ModuleNotFoundError: No module named 'pocketsphinx'

For added context, I'm on an Arch Linux setup with pocketsphinx 5.0.0-2 installed by pacman, and the venv has version 5.0.1 installed.

I can replicate the error straight after cloning the repo, with no venv installed there, so I doubt that the venv has anything to do with it actually

when run root program aborted

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
SoundFiles: init
SoundFiles: scanning
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:877:(find_matching_chmap) Found no matching channel map
connect(2) call to /dev/shm/jack-0/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
connect(2) call to /dev/shm/jack-0/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
connect(2) call to /dev/shm/jack-0/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
Detection started
python3: src/hostapi/alsa/pa_linux_alsa.c:3636: PaAlsaStreamComponent_BeginPolling: Assertion `ret == self->nfds' failed.
Aborted (core dumped)****

No module named 'Xlib'

python will import Xlib from my base conda enviroment but not when i run the script...

Traceback (most recent call last):
File "./main.py", line 6, in
from profileeditwnd import ProfileEditWnd
File "/home/brando/algos/AudioPython/LinVAM/profileeditwnd.py", line 7, in
from profileexecutor import *
File "/home/brando/algos/AudioPython/LinVAM/profileexecutor.py", line 2, in
from pynput.mouse import Button, Controller
File "/home/brando/algos/AudioPython/LinVAM/pynput/init.py", line 41, in
from . import mouse
File "/home/brando/algos/AudioPython/LinVAM/pynput/mouse/init.py", line 48, in
from ._xorg import Button, Controller, Listener
File "/home/brando/algos/AudioPython/LinVAM/pynput/mouse/_xorg.py", line 32, in
import Xlib.display
ModuleNotFoundError: No module named 'Xlib'

No Fkey functionality

Hello,
As the subject suggests, I cannot seem to input any fkey macros into the software. The specific application I am going to be using this for requires fkey support. I've dug a little through the 'keyboard' files, but I'm not much of a coder and I cannot detect the issue. Maybe the database the keyboard layout is pulled from doesn't have fkeys?
Thank you!

Docker setup

Any interest in having a docker build for this? I’ve been searching for awhile trying to figure out how to get VoiceAttack to work on a Linux desktop but so far no luck. This repo is the closest thing to a Linux alternative. Problem is, I don’t run a Debian (or derivative) and would rather have an isolated environment to run this code under rather than make changes to my actual system (dependencies). One way to make this cross platform would be docker. It has been awhile since any code has been pushed to this repo so before I go down this road, I thought I would ask.

Unable to run the script.

Probably relevant info: I am using Linux Mint 21.1 Cinnamon, Kernel version 5.19.0-45-generic.

I installed everything as the main page instructs, ran into some issues, and got further by installing the packages through the package manager rather than pip3. After getting everything to install(including the parts labeled optional) I tried both methods of usage(root and non root). Both methods spat out different errors at me and did not run.

The ROOT method spat out:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
SoundFiles: init
SoundFiles: scanning
No folder 'voicepacks' found. Please create one and copy all your voicepacks in there.
ALSA lib pcm_dsnoop.c:601:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2664:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pcm_oss.c:397:(_snd_pcm_oss_open) Cannot open device /dev/dsp
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib confmisc.c:160:(snd_config_get_card) Invalid field card
ALSA lib pcm_usb_stream.c:482:(_snd_pcm_usb_stream_open) Invalid card 'card'
ALSA lib pcm_dsnoop.c:601:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1032:(snd_pcm_dmix_open) unable to open slave
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2048
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2718
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2842
Traceback (most recent call last):
  File "/home/leaderofthe00fkins/LinVAM/./main.py", line 332, in <module>
    mainWnd = MainWnd()
  File "/home/leaderofthe00fkins/LinVAM/./main.py", line 26, in __init__
    self.m_profileExecutor = ProfileExecutor(None, self)
  File "/home/leaderofthe00fkins/LinVAM/profileexecutor.py", line 33, in __init__
    self.m_stream = self.m_pyaudio.open(format=pyaudio.paInt16, channels=1, rate=16000, input=True)
  File "/usr/lib/python3/dist-packages/pyaudio.py", line 750, in open
    stream = Stream(self, *args, **kwargs)
  File "/usr/lib/python3/dist-packages/pyaudio.py", line 441, in __init__
    self._stream = pa.open(**arguments)
OSError: [Errno -9997] Invalid sample rate

The second method spat out:

Traceback (most recent call last):
  File "/home/leaderofthe00fkins/LinVAM/./main.py", line 6, in <module>
    from profileeditwnd import ProfileEditWnd
  File "/home/leaderofthe00fkins/LinVAM/profileeditwnd.py", line 7, in <module>
    from profileexecutor import *
  File "/home/leaderofthe00fkins/LinVAM/profileexecutor.py", line 8, in <module>
    from pocketsphinx.pocketsphinx import *
ModuleNotFoundError: No module named 'pocketsphinx.pocketsphinx'

Not sure why I would have an "Invalid sample rate". Nor did I find a package or really anything called "pocketsphinx.pocketsphinx".

Activate external python scripts

Hi,

First off, congratulations on the great piece of software!

I am wondering if it is possible to activate an external python script?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.