Help using Respeaker 4-mic Array with Jasper

574 views
Skip to first unread message

Martin Olsen

unread,
Mar 16, 2018, 1:36:02 PM3/16/18
to Jasper Support Forum
Hello All

I hope someone can help me with this problem i am having launching jasper.

Instead of using the normal USB-microphone i am using an ReSpeaker 4-mic Array (https://www.seeedstudio.com/ReSpeaker-4-Mic-Array-for-Raspberry-Pi-p-2941.html), that got from a coworker. 

I have tested the microphone and can record sound using the microphone and then playback the audio, so that part is working. However, whenever i launch jasper i get these following errors:

*******************************************************
*             JASPER - THE TALKING COMPUTER           *
* (c) 2015 Shubhro Saha, Charlie Marsh & Jan Holthuis *
*******************************************************
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver return                                                                                                                                                             ed error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned er                                                                                                                                                             ror: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned err                                                                                                                                                             or: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directo                                                                                                                                                             ry
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver return                                                                                                                                                             ed error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned er                                                                                                                                                             ror: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned err                                                                                                                                                             or: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directo                                                                                                                                                             ry
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM sysdefault
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_dmix.c:990:(snd_pcm_dmix_open) The dmix plugin supports only playba                                                                                                                                                             ck stream
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only                                                                                                                                                              capture stream
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only                                                                                                                                                              capture stream
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver return                                                                                                                                                             ed error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned er                                                                                                                                                             ror: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned err                                                                                                                                                             or: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directo                                                                                                                                                             ry
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM dmix
Traceback (most recent call last):
  File "/home/pi/jasper-client/jasper.py", line 151, in <module>
    app.run()
  File "/home/pi/jasper-client/jasper.py", line 121, in run
    conversation.handleForever()
  File "/home/pi/jasper-client/client/conversation.py", line 31, in handleForeve                                                                                                                                                             r
    threshold, transcribed = self.mic.passiveListen(self.persona)
  File "/home/pi/jasper-client/client/mic.py", line 121, in passiveListen
    data = stream.read(CHUNK)
  File "/usr/local/lib/python2.7/dist-packages/pyaudio.py", line 608, in read
    return pa.read_stream(self._stream, num_frames, exception_on_overflow)
IOError: [Errno -9981] Input overflowed


It is because i cannot use a respeaker 4-mic array with jasper? Or what seems to be the issue? : 

Michael E

unread,
Mar 16, 2018, 6:09:51 PM3/16/18
to Jasper Support Forum
I think there is something wrong with your sound configuration

can you post the output from

aplay -l
arecord -l
cat /proc/asound/cards
cat /proc/asound/modules

please?

maybe i misstyped, so take a look at the path

Martin Olsen

unread,
Mar 18, 2018, 2:40:54 PM3/18/18
to Jasper Support Forum
Sorry for late the reply, Michael.

Here it is, aplay -l: 

**** List of PLAYBACK Hardware Devices ****
card 1: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7
card 1: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

arecord -l: 

**** List of CAPTURE Hardware Devices ****
card 2: seeed4micvoicec [seeed-4mic-voicecard], device 0: bcm2835-i2s-ac10x-codec0 ac10x-codec0-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

cat /proc/asound/cards

 1 [ALSA           ]: bcm2835 - bcm2835 ALSA
                      bcm2835 ALSA
 2 [seeed4micvoicec]: seeed-4mic-voic - seeed-4mic-voicecard
                      seeed-4mic-voicecard

cat /proc/asound/modules

 1 snd_bcm2835
 2 snd_soc_simple_card

Thank you for looking into it, i've tried several different solutions found online, but couldnt get them to work. 

Michael E

unread,
Mar 18, 2018, 4:14:40 PM3/18/18
to Jasper Support Forum
Hey Martin

as you can see, card 0 is missing,

Maybe there are 2 solutions;

1. change the content of the /usr/share/alsa/alsa.conf at the right position, so that the 2 snd_soc_simple_card is assigned to 0. But I did not try it, so it is a maybe

2. in the tts.py change the line with

      cmd = ['aplay', '-D', 'plughw:0,0', str(filename)]

to the right card:

      cmd = ['aplay', '-D', 'plughw:2,0', str(filename)]

I hope this helps.

If somebody has better idea, please post it!

Michael


Martin Olsen

unread,
Mar 18, 2018, 5:27:16 PM3/18/18
to Jasper Support Forum
The solution with changing the settings in the tts.py have helped to remove some of the errors. However, i am not sure if changed all the correct settings in the alsa.conf.

Here is what i get now: 

ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.front
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround21
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround40
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround41
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround50
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround51
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.surround71
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.iec958
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.hdmi
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.modem
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline
ALSA lib pcm_dmix.c:990:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dsnoop.c:556:(snd_pcm_dsnoop_open) The dsnoop plugin supports only capture stream
ALSA lib pcm_dmix.c:1052:(snd_pcm_dmix_open) unable to open slave

Michael E

unread,
Mar 20, 2018, 7:47:28 AM3/20/18
to Jasper Support Forum
Hello Martin,

it ssems, as if there mircophone is not assigned to the right port in alsa.conf

did you try different settings?

Michael

Martin Olsen

unread,
Mar 20, 2018, 11:29:06 AM3/20/18
to Jasper Support Forum
Hey Micheal.

I'v tried to change some settings in alsa.conf, but i am rather new to RPIs and using the cmd prompt to edit.

Do you have any suggestions to what i need to change, because what i have changed, didnt really affect anything.

Thanks for all your help already mate!

Martin

achuj...@gmail.com

unread,
May 5, 2018, 9:43:58 AM5/5/18
to Jasper Support Forum
hey
did you find a solution to it ?
I'm trying to make jasper work in rpi3 b+ (latest model 2018) with respeaker 2 mic 
if you've found a proper solution to this problem , it'll be great if you could share it here

Lee Melbourne

unread,
May 9, 2018, 8:01:31 PM5/9/18
to Jasper Support Forum
I dont fully understand how all the audio stuff works, but....

The Jasper code is set to use a specific chunk size (1024 I seem to recall). Perhaps this is not how the microphone is sampling sound and feeding back. If it is recording in large chunks then that would explain the "overflow" aspect of the error message. I would chase up Seeed for information on the detailed specs of the microphone and what sample rates it supports / works at.

G10DRAS

unread,
Jun 9, 2018, 7:57:48 PM6/9/18
to Jasper Support Forum
Well if you see

https://github.com/respeaker/seeed-voicecard/blob/master/asound_4mic.conf

They are using their custom pcm ac108 for respeaker.

Reply all
Reply to author
Forward
0 new messages