alexylem / jarvis

Jarvis.sh is a simple configurable multi-lang assistant.
http://openjarvis.com
MIT License
805 stars 197 forks source link

Expression 'paTimedOut' failed in 'src/os/unix/pa_unix_util.c', line: 387 #101

Closed xsertunc closed 8 years ago

xsertunc commented 8 years ago

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)

pi@raspberrypi:~/jarvis $ sudo ./jarvis.sh
Checking for updates...[Up-to-date]

------------ Config ------------
system               Linux 4.4.19-v7+ armv7l 
os                   "Raspbian GNU/Linux 8 (jessie)" 
language             en_US 
play_hw              hw:0,1 
rec_hw               hw:1,0 
speaker              ALSA 
microphone           Logitech, Inc. Webcam C270 
trigger_stt          snowboy 
command_stt          google 
tts_engine           svox_pico 
conversation_mode    true 
--------------------------------

DEBUG: program_startup hook
snowboy: Hello
snowboy: Waiting to hear 'snowboy'
sertunc: (listening...)
DEBUG: models=snowboy
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

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

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
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Keyword 1 detected at time: 2016-08-27 12:08:46
DEBUG: modelid=0
snowboy
DEBUG: entering_cmd hook
snowboy: Yes?
sertunc: (listening...)
./timeout.sh 10 rec -V1 -q -r 16000 -c 1 -b 16 -e signed-integer --endian little jarvis-record.wav silence 1 0.5 5% 1 1 5% trim 0 10
DEBUG: speech duration was 07 (10 = 1 sec)
DEBUG: {"result":[]}
{"result":[{"alternative":[{"transcript":"hello","confidence":0.76760346},{"transcript":"Halo"},{"transcript":"Bi-Lo"},{"transcript":"Hollow"},{"transcript":"aloe"}],"final":true}],"result_index":0}
hello
$> say "Hello back"
snowboy: Hello back
sertunc: (listening...)
./timeout.sh 10 rec -V1 -q -r 16000 -c 1 -b 16 -e signed-integer --endian little jarvis-record.wav silence 1 0.5 5% 1 1 5% trim 0 10
DEBUG: speech duration was  (10 = 1 sec)
DEBUG: timeout, end of conversation
DEBUG: exiting_cmd hook

snowboy: Waiting to hear 'snowboy'
sertunc: (listening...)
DEBUG: models=snowboy
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

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

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
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Silence
INFO:snowboy:Keyword 1 detected at time: 2016-08-27 12:09:10
DEBUG: modelid=0
snowboy
DEBUG: entering_cmd hook
snowboy: Yes?
sertunc: (listening...)
./timeout.sh 10 rec -V1 -q -r 16000 -c 1 -b 16 -e signed-integer --endian little jarvis-record.wav silence 1 0.5 5% 1 1 5% trim 0 10
DEBUG: speech duration was 03 (10 = 1 sec)
DEBUG: {"result":[]}
{"result":[{"alternative":[{"transcript":"hello","confidence":0.93054378},{"transcript":"Halo"},{"transcript":"ello"},{"transcript":"la"},{"transcript":"yellow"}],"final":true}],"result_index":0}
hello
$> say "Hello back"
snowboy: Hello back
sertunc: (listening...)
./timeout.sh 10 rec -V1 -q -r 16000 -c 1 -b 16 -e signed-integer --endian little jarvis-record.wav silence 1 0.5 5% 1 1 5% trim 0 10
DEBUG: speech duration was  (10 = 1 sec)
DEBUG: timeout, end of conversation
DEBUG: exiting_cmd hook

snowboy: Waiting to hear 'snowboy'
sertunc: (listening...)
DEBUG: models=snowboy
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.iec958.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused

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

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
`
devauxa commented 8 years ago

Try to run without sudo (you need run : chown pi:pi -R ~/jarvis)

xsertunc commented 8 years ago

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

alexylem commented 8 years ago

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

xsertunc commented 8 years ago

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

alexylem commented 8 years ago

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

xsertunc commented 8 years ago

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

aazimh commented 7 years ago

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.

alexylem commented 7 years ago

@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 ?

aazimh commented 7 years ago

@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?

alexylem commented 7 years ago

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 😉

aazimh commented 7 years ago

@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! :)

alexylem commented 7 years ago

@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.

aazimh commented 7 years ago

@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.

alexylem commented 7 years ago

@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.

aazimh commented 7 years ago

@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!