Jasper is getting audio error while running

241 views
Skip to first unread message

Neeraj MG

unread,
Mar 6, 2016, 1:17:00 PM3/6/16
to Jasper Support Forum
I am using plantronics usb headset with mic for my raspberry pi. While running jasper on my pi, I am getting various audio errors. Some times error names and numbers are changing. But the problem is almost same. Here is the latest error.

pi@raspberrypi:~ $ /home/pi/jasper/jasper.py 
*******************************************************
*             JASPER - THE TALKING COMPUTER           *
* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *
*******************************************************
ALSA lib confmisc.c:768:(parse_card) cannot find card '1'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
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 sysdefault
ALSA lib confmisc.c:768:(parse_card) cannot find card '1'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
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 sysdefault
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.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 pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
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 confmisc.c:768:(parse_card) cannot find card '1'
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
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 dmix
ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card
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
Traceback (most recent call last):
  File "/home/pi/jasper/jasper.py", line 148, in <module>
    app.run()
  File "/home/pi/jasper/jasper.py", line 118, in run
    conversation.handleForever()
  File "/home/pi/jasper/client/conversation.py", line 31, in handleForever
    threshold, transcribed = self.mic.passiveListen(self.persona)
  File "/home/pi/jasper/client/mic.py", line 110, in passiveListen
    frames_per_buffer=CHUNK)
  File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 747, in open
    stream = Stream(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 442, in __init__
    self._stream = pa.open(**arguments)
IOError: [Errno Invalid input device (no default output device)] -9996





when i did --debug, I got the following error


pi@raspberrypi:/ $ 
pi@raspberrypi:/ $ /home/pi/jasper/jasper.py --debug
*******************************************************
*             JASPER - THE TALKING COMPUTER           *
* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *
*******************************************************
DEBUG:client.diagnose:Checking network connection to server 'www.google.com'...
DEBUG:client.diagnose:Network connection working
DEBUG:__main__:Trying to read config file: '/home/pi/.jasper/profile.yml'
DEBUG:client.diagnose:Checking python import 'pocketsphinx'...
DEBUG:client.diagnose:Python module 'pocketsphinx' found: '/usr/lib/python2.7/dist-packages/pocketsphinx.so'
DEBUG:client.diagnose:Checking executable 'aplay'...
DEBUG:client.diagnose:Executable 'aplay' found: '/usr/bin/aplay'
DEBUG:client.diagnose:Checking executable 'espeak'...
DEBUG:client.diagnose:Executable 'espeak' found: '/usr/bin/espeak'
DEBUG:client.vocabcompiler:compiled_revision is 'bb74ae36d130ef20de710e3a77b43424b8fa774f'
DEBUG:client.brain:Looking for modules in: '/home/pi/jasper/client/modules'
DEBUG:client.brain:Found module 'Birthday' with words: ['BIRTHDAY']
DEBUG:client.brain:Found module 'Gmail' with words: ['EMAIL', 'INBOX']
DEBUG:client.brain:Found module 'HN' with words: ['HACKER', 'NEWS', 'YES', 'NO', 'FIRST', 'SECOND', 'THIRD']
DEBUG:client.brain:Found module 'Joke' with words: ['JOKE', 'KNOCK KNOCK']
DEBUG:client.brain:Found module 'Life' with words: ['MEANING', 'OF', 'LIFE']
DEBUG:client.brain:Found module 'MPDControl' with words: ['MUSIC', 'SPOTIFY']
DEBUG:client.brain:Found module 'News' with words: ['NEWS', 'YES', 'NO', 'FIRST', 'SECOND', 'THIRD']
DEBUG:client.brain:Found module 'Notifications' with words: ['FACEBOOK', 'NOTIFICATION']
DEBUG:client.brain:Found module 'Time' with words: ['TIME']
DEBUG:client.brain:Found module 'Unclear' with words: []
DEBUG:client.brain:Found module 'Weather' with words: ['WEATHER', 'TODAY', 'TOMORROW']
DEBUG:client.vocabcompiler:compiled_revision is '8c0e66f387b7177205726ecfcb3edd9df0d23653'
INFO:client.mic:Initializing PyAudio. ALSA/Jack error messages that pop up during this process are normal and can usually be safely ignored.
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 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 pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card
ALSA lib pcm_hw.c:1667:(_snd_pcm_hw_open) Invalid value for card
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:client.mic:Initialization of PyAudio completed.
DEBUG:client.tts:Saying 'How can I be of service, N?' with 'espeak-tts'
DEBUG:client.tts:Executing espeak -v default+m3 -p 40 -s 160 -w /tmp/tmpxkcW2x.wav 'How can I be of service, N?'
DEBUG:client.tts:Executing aplay -D plughw:1,0 /tmp/tmpxkcW2x.wav
DEBUG:client.tts:Output was: 'Playing WAVE '/tmp/tmpxkcW2x.wav' : Signed 16 bit Little Endian, Rate 22050 Hz, Mono
'
DEBUG:client.brain:Looking for modules in: '/home/pi/jasper/client/modules'
DEBUG:client.brain:Found module 'Birthday' with words: ['BIRTHDAY']
DEBUG:client.brain:Found module 'Gmail' with words: ['EMAIL', 'INBOX']
DEBUG:client.brain:Found module 'HN' with words: ['HACKER', 'NEWS', 'YES', 'NO', 'FIRST', 'SECOND', 'THIRD']
DEBUG:client.brain:Found module 'Joke' with words: ['JOKE', 'KNOCK KNOCK']
DEBUG:client.brain:Found module 'Life' with words: ['MEANING', 'OF', 'LIFE']
DEBUG:client.brain:Found module 'MPDControl' with words: ['MUSIC', 'SPOTIFY']
DEBUG:client.brain:Found module 'News' with words: ['NEWS', 'YES', 'NO', 'FIRST', 'SECOND', 'THIRD']
DEBUG:client.brain:Found module 'Notifications' with words: ['FACEBOOK', 'NOTIFICATION']
DEBUG:client.brain:Found module 'Time' with words: ['TIME']
DEBUG:client.brain:Found module 'Unclear' with words: []
DEBUG:client.brain:Found module 'Weather' with words: ['WEATHER', 'TODAY', 'TOMORROW']
INFO:apscheduler.scheduler:Scheduler started
DEBUG:apscheduler.scheduler:Looking for jobs to run
DEBUG:apscheduler.scheduler:No jobs; waiting until a job is added
INFO:apscheduler.scheduler:Added job "Notifier.gather" to job store "default"
INFO:client.conversation:Starting to handle conversation with keyword 'JASPER'.
DEBUG:client.conversation:Started listening for keyword 'JASPER'
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: 2719
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2843
Traceback (most recent call last):
  File "/home/pi/jasper/jasper.py", line 148, in <module>
    app.run()
  File "/home/pi/jasper/jasper.py", line 118, in run
    conversation.handleForever()
  File "/home/pi/jasper/client/conversation.py", line 31, in handleForever
    threshold, transcribed = self.mic.passiveListen(self.persona)
  File "/home/pi/jasper/client/mic.py", line 110, in passiveListen
    frames_per_buffer=CHUNK)
  File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 747, in open
    stream = Stream(self, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 442, in __init__
    DEBUG:apscheduler.scheduler:Looking for jobs to run
self._stream = pa.open(**arguments)
IOErrorDEBUG:apscheduler.scheduler:Next wakeup is due at 2016-03-06 18:05:59.333307+00:00 (in 29.983886 seconds)
: [Errno Invalid sample rate] -9997
INFO:apscheduler.scheduler:Scheduler has been shut down









Please help me fast. I am doing this project as a part of my academics. So I need to solve this issue urgently.



Thanks in advance

Sourav Choudhary

unread,
Mar 22, 2016, 10:33:03 AM3/22/16
to Jasper Support Forum
Am also getting the same error.
Please help on this issue asap.
Reply all
Reply to author
Forward
0 new messages