Closed xsertunc closed 8 years ago
Try to run without sudo (you need run : chown pi:pi -R ~/jarvis)
without sudo , before starting it asks : mv: replace 'jarvis-commands', overriding mode 0644 (rw-r--r--)?
do not now is it bad or good , so i start with sudo
Jarvis must not be started with sudo (for many reasons), as per the wiki: https://github.com/alexylem/jarvis/wiki/usage
Note: Ne jamais lancer Jarvis avec sudo (les fichiers générés ne seraient plus accessibles à la prochaine utilisation)
As suggested by @devauxa, you first need to change ownership of all generated files within ~/jarvis
(or wherever your jarvis folder is):
sudo chown pi:pi -R ~/jarvis
Idea: I could add a check at program startup to verify it is not started with sudo
i will try it. also do i need to uninstall it and install it again ? may be files has already changed because i miss used it with sudo ? also is translation of wiki to english possible ?
thanks
Install it again: no need, just change the file owner as suggested above
Files changed? yes most probably, this is why you need to do the chown
. Please do it and let us know if we can close the ticket.
Translation of wiki is discussed here: #107
sorry it is a bit late but i tested it for 3 days before telling you it is running continiously for 3 days without any problem, chown fixed it, i think. you can close the ticket thank you
Hi guys,
Sorry to hijack this thread, but I'm facing exactly the same issue when using Snowboy for a non-Jarvis project I'm working on. I understand the circumstances may be different, but is there any insight you could give me into what this error means and how I could fix it?
The Snowboy detector starts successfully maybe 20% of the time, all the other times I get the error shared by @xsertunc above (paTimedOut to pthread_join).
Thanks, Aazim.
@aazimh do you use the latest version of Jarvis? We have changed a lot the script of snowboy that is now using sox
instead of pyaudio
.
Also try stopping pulseaudio
just in case.
Have you also made sure the permissions are ok as it fixed the issue for @xsertunc ?
@alexylem I'm actually not using Jarvis as I mentioned before, I'm only using Snowboy for hotword detection and then I convert my speech to text and process it on my own. The part I'm struggling with is initializing the detector as I get the same error mentioned above which seems to be a pyaudio issue.
I ran pulseaudio -k
and made sure it's dead, but still get the error.
I like the idea of using sox instead of pyaudio - do you think it's possible for me to replace my snowboydetector.py file with yours and try that instead? Or have you changed it significantly enough for it to break other things?
You can retrieve our maindecoder_sox.py
and use it from our main.py
here:
https://github.com/alexylem/jarvis/tree/master/stt_engines/snowboy
Hope it will fix your pb. Otherwize I would recommend you to raise a ticket in the actual snowboy repo 😉
@alexylem It actually worked! I basically pulled the recording functions from your file and added them into mine and moved some things around and it worked! Thank you so much!
Also, just a note, when using the 'rec' function to record I kept getting an EOF Error - could be just me as my 'rec' command doesn't work in the terminal either. I moved to 'arecord' and it started working though, just FYI.
Thanks so much again, this has been bothering me for the last 3 days so it's a huge relief to finally have it working! :)
@aazimh glad to hear, you're welcome! rec
is actually part of sox
package which you can install via sudo apt-get install sox
. It is a dependency of Jarvis that's why we used it instead of arecord
.
@alexylem Yes I have sox
installed, but I think my settings are off as whenever I use rec
in the terminal it just says can't open input 'default'
so I assume my microphone needs to be set up as the default input device somehow.
I have another question - the stream that is being recorded (whether through rec
or arecord
), it's in memory right? So is it being cleared at all or does it just use up more and more memory the longer the program is running? I think the get
to RingBuffer clears it, but not sure so wanted to confirm.
@aazimh yes indeed you need to get it as default. We use ~/.asoundrc
for this.
I think it is consumed as it records. I have not seen any significant increasing of memory by snowboy, except CPU when there is noise.
@alexylem Stopped being lazy and Googled it, just needed to set export AUDIODEV=hw:1,0
and so I'm back to using rec
now :) thanks for all your help!
i use snowboy to trigger and google to stt
most of the time trigger and recognitions works excellent but sometimes trigger (snowboy) doesn't start and it gives this error:
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 Expression 'paTimedOut' failed in 'src/os/unix/pa_unix_util.c', line: 387 Expression 'PaUnixThread_New( &stream->thread, &CallbackThreadFunc, stream, 1., stream->rtSched )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2998 Expression 'pthread_join( self->thread, &pret )' failed in 'src/os/unix/pa_unix_util.c', line: 441
all log is like this: (i use rpi3 + logitech c270 webcam)