Possible audio problem? Terminates after "How can I be of service, #myname"?

143 views
Skip to first unread message

Kevin Lin

unread,
Feb 13, 2016, 7:40:44 PM2/13/16
to Jasper Support Forum
Hi, 

I've had a little hard time trying to setup Jasper on my Pi 2, and now it seems it finally starts working! Jasper was able to detect what I was saying:

client.stt:Transcribed: ['JASPER']


However, it wasn't replying or doing anything else. There were also a lot of errors before detection started. So I went to tts.py and changed the 
aplay -D plughw:1,0

line to:

aplay -d plughw:1.0


Now when I start Jasper, the program will tell me "How can I be of service, Kevin?", before it terminates (does not listen for speech inputs anymore). I changed -D to -d because -D gave an error when I tested it on a separate .wav file I recorded for testing.


Might that be what the error is about? I tried to change -D back to -d, but my program still terminated (without saying "How can I be of service, Kevin?"). I'm not sure what's happening here as I don't remember changing anything other than the line in tts.py. 


Here is the full error log that I get now:

  1. pi@raspberrypi ~/jasper $ python jasper.py
  2. *******************************************************
  3. *             JASPER - THE TALKING COMPUTER           *
  4. * (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *
  5. *******************************************************
  6. ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.front.0:CARD=0'
  7. ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
  8. ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
  9. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM front
  10. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
  11. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
  12. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
  13. ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
  14. ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
  15. ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
  16. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
  17. ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
  18. ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
  19. ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
  20. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround21
  21. ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround40.0:CARD=0'
  22. ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
  23. ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
  24. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround40
  25. ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
  26. ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
  27. ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
  28. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround41
  29. ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
  30. ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
  31. ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
  32. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround50
  33. ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround51.0:CARD=0'
  34. ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
  35. ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
  36. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround51
  37. ALSA lib confmisc.c:1286:(snd_func_refer) Unable to find definition 'cards.bcm2835.pcm.surround71.0:CARD=0'
  38. ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
  39. ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
  40. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM surround71
  41. 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'
  42. ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
  43. ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
  44. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM iec958
  45. 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'
  46. ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
  47. ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
  48. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
  49. 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'
  50. ALSA lib conf.c:4259:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
  51. ALSA lib conf.c:4738:(snd_config_expand) Evaluate error: No such file or directory
  52. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM spdif
  53. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
  54. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
  55. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
  56. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
  57. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
  58. ALSA lib pcm.c:2239:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
  59. Cannot connect to server socket err = No such file or directory
  60. Cannot connect to server request channel
  61. jack server is not running or cannot be started
  62. Traceback (most recent call last):
  63.  File "jasper.py", line 148, in <module>
  64.    app.run()
  65.  File "jasper.py", line 118, in run
  66.    conversation.handleForever()
  67.  File "/home/pi/jasper/client/conversation.py", line 31, in handleForever
  68.    threshold, transcribed = self.mic.passiveListen(self.persona)
  69.  File "/home/pi/jasper/client/mic.py", line 110, in passiveListen
  70.    frames_per_buffer=CHUNK)
  71.  File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 747, in open
  72.    stream = Stream(self, *args, **kwargs)
  73.  File "/usr/lib/python2.7/dist-packages/pyaudio.py", line 442, in __init__
  74.    self._stream = pa.open(**arguments)
  75. IOError: [Errno Invalid input device (no default output device)] -9996


Any help would be really appreciated!

Kevin Lin

unread,
Feb 13, 2016, 9:57:12 PM2/13/16
to Jasper Support Forum
Update: 

I found out a fix to the error on line 75 (invalid input device). I have to re-plug in my USB microphone into the Raspberry Pi after every run (and subsequent quit), or else I would receive that error. Does anyone know why?

However, I'm still receiving the ALSA errors; the only difference is that instead of terminating, the program continues to listen.

Chris Curl

unread,
Feb 14, 2016, 12:44:59 AM2/14/16
to Jasper Support Forum
i found that the tts.py didn't work for my setup. i removed the "-hw" and its arg from the play() function as follows:

cmd = ['aplay', str(filename)]

That fixed my system. I hope it works for yours

Carlos Teixeira

unread,
May 7, 2016, 9:27:06 AM5/7/16
to Jasper Support Forum
Thanks you so much!! This made it all work for me.
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages