I am little stuck when trying to install the 4 Mic linear array with my raps 3 B+.
I have installed the kernel drivers (seeed-voicecard) and rebooted.
However the mics are not recognized:
arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
default
ac108
dmixer
ac101
Also the snips audio server does not see the device.
arecord -Dac108 -f S32_LE -r 16000 -c 4 a.wav
says: invalid value for card.
Hi there,
It seems the driver is not installed correctly. Please uninstall the driver and install it again. If you still can not get it work, you can download the image 2018-08-06-raspbian-for-respeaker.zip with the driver installed. thanks.
<LINK_TEXT text=“https://v2.fangcloud.com/share/7395fd13 … ario=share”>https://v2.fangcloud.com/share/7395fd138a1cab496fd4792fe5?folder_id=188000207913&lang=en&preview=188002339479&scenario=share</LINK_TEXT>
</s>cd seeed-voicecard
sudo ./uninstall.sh
sudo reboot
cd seeed-voicecard
sudo ./install.sh
<e>
Hi there,
Previously the driver is not compatible with Linux raspberrypi 4.19.42-v7+. We just updated the driver by following below instructions. thanks.
</s>cd seeed-voicecard
sudo ./uninstall.sh
sudo reboot
cd seeed-voicecard
sudo ./install.sh<e>
</s>pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.19.42-v7+ #1219 SMP Tue May 14 21:20:58 BST 2019 armv7l GNU/Linux
pi@raspberrypi:~ $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: seeed4micvoicec [seeed-4mic-voicecard], device 0: bcm2835-i2s-ac10x-codec0 ac10x-codec.1-003b-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
pi@raspberrypi:~ $ <e>
Thanks, that solved the issue.
Hi,
I’ve followed the installation instructions. When I check the record device I get the following:
pi@raspberrypi:~/griefbot/griefbot $ arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
ac108
dmixer
ac101
default
Playback/recording through the PulseAudio sound server
sysdefault:CARD=seeed8micvoicec
seeed-8mic-voicecard,
Default Audio Device
dmix:CARD=seeed8micvoicec,DEV=0
seeed-8mic-voicecard,
Direct sample mixing device
dsnoop:CARD=seeed8micvoicec,DEV=0
seeed-8mic-voicecard,
Direct sample snooping device
hw:CARD=seeed8micvoicec,DEV=0
seeed-8mic-voicecard,
Direct hardware device without any conversions
plughw:CARD=seeed8micvoicec,DEV=0
seeed-8mic-voicecard,
Hardware device with all software conversions
Which is not exactly the same as the list I see on your webpage.
I am able to record and play the a.wav file correctly, but when I try to run my python project (a chatbot) It doesn’t seem to work, I just don’t get an answer. I think there is a problem with ALSA.
When I run my project I get this:
(bot.py:18525): Gtk-CRITICAL **: gtk_widget_get_preferred_width_for_height: assertion ‘height >= 0’ failed
(bot.py:18525): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width 586 and height -1
hola
Expression ‘alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 924
Expression ‘alsa_snd_pcm_hw_params_set_period_size_near( pcm, hwParams, &alsaPeriodFrames, &dir )’ failed in ‘src/hostapi/alsa/pa_linux_alsa.c’, line: 924
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 confmisc.c:1281:(snd_func_refer) Unable to find definition ‘defaults.bluealsa.device’
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib confmisc.c:1281:(snd_func_refer) Unable to find definition ‘defaults.bluealsa.device’
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:4996:(snd_config_expand) Args evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM bluealsa
ALSA lib pcm_dmix.c:990:(snd_pcm_dmix_open) The dmix plugin supports only playback stream
connect(2) call to /tmp/jack-0/default/jack_0 failed (err=No such file or directory)
attempt to connect to server failed
1111+00000000-0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000GRABANDO
Sorry for all the text. Hope you can help.
Best
David
Hi David,
The driver is updated and wiki page is not updated yet. We will update the wiki page. Which code you do run and then you face the issue? thanks.
I run a python script, a chatbot to be precise
You blog post is just completely quality and informative. Many new facts and information which I have not heard about before. Keep sharing more blog posts.
What about the wiki alexa demo? Does it work correctly? thanks.
It doesn’t work either
I’ve followed the instruction, but nothing seems to work. Should I use the raspbian image you posted on this thread? When would the wiki page be updated? I’ve been struggling with this issue for weeks know.
Best
Hi there~,
I follow wiki page and test it well. Can you use the audacity to record the audio files,please? THANKS.
</s>pi@raspberrypi:~ $ pulseaudio --start
N: [pulseaudio] main.c: User-configured server at {74222c7487734792b86d4eb5302d9ef4}unix:/run/user/1000/pulse/native, which appears to be local. Probing deeper.
pi@raspberrypi:~ $ pactl info
Server String: unix:/run/user/1000/pulse/native
Library Protocol Version: 32
Server Protocol Version: 32
Is Local: yes
Client Index: 7
Tile Size: 65496
User Name: pi
Host Name: raspberrypi
Server Name: pulseaudio
Server Version: 10.0
Default Sample Specification: s32le 8ch 96000Hz
Default Channel Map: front-left,front-left-of-center,front-center,front-right,front-right-of-center,rear-center,aux0,aux1
Default Sink: alsa_output.platform-soc_sound.seeed-2ch
Default Source: alsa_input.platform-soc_sound.seeed-8ch
Cookie: c7b7:a27d
pi@raspberrypi:~ $ source ~/env/bin/activate
(env) pi@raspberrypi:~ $ cd ~/voice-engine/examples
(env) pi@raspberrypi:~/voice-engine/examples $ python kws_alexa_for_4mic_liner_pihat.py
['arecord', '-t', 'raw', '-f', 'S16_LE', '-c', '8', '-r', '16000', '-D', 'default', '-q']
<e>
Ok, so I tried this a few times and I’ve noticed that sometimes audacity does not recognize the input device, I need to reinstall the sound card a few times for it to appear. It finally recorded and played in audacity, alexa worked, but after the first use it stops working saying that ssl handshake failed. I reinstalled everything and the input device is recognized by audacity, but I can’t get sound from the speaker jack, but rather from the raspberry pi 3.5 mm jack. When I use aplay and arecord I can’t use it again, since I get a ‘Device or resource busy’ error. Do I have to keep reinstalling the driver until it works? And once it does, would I have to do everything all over again?
Hi there~
For the work around, you can download the 2018.08.06 raspbian for respeaker image. it includes the drivers and avs as well. We are trying to simulate your issue. thanks.
<LINK_TEXT text=“https://v2.fangcloud.com/share/7395fd13 … 13&lang=en”>https://v2.fangcloud.com/share/7395fd138a1cab496fd4792fe5?folder_id=188000207913&lang=en</LINK_TEXT>
I’ll try that. Thanks
I tried the Raspbian image you suggested and it’s the same story. I’ll try to describe my problem, because I get the exact same behavior when I follow the wiki steps. I’ve tried to install the drivers using the 4 mic linear array as well as the circular 6 mic array and no luck so far.
In the following message I’ll copy the entire terminal activity when following the wiki steps. Maybe that’ll give you a better idea of what’s going on.
Best regards
David
pi@raspberrypi:~ $ sudo apt-get update
Des:1 http://linux.teamviewer.com/deb stable InRelease [9.388 B]
Obj:2 http://archive.raspberrypi.org/debian stretch InRelease
Obj:3 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Des:4 http://linux.teamviewer.com/deb stable/main armhf Packages [2.577 B]
Descargados 12,0 kB en 1s (6.009 B/s)
Leyendo lista de paquetes… Hecho
pi@raspberrypi:~ $ sudo apt-get upgrade
Leyendo lista de paquetes… Hecho
Creando árbol de dependencias
Leyendo la información de estado… Hecho
Calculando la actualización… Hecho
El paquete indicado a continuación se instaló de forma automática y ya no es necesario.
realpath
Utilice «sudo apt autoremove» para eliminarlo.
0 actualizados, 0 nuevos se instalarán, 0 para eliminar y 0 no actualizados.
pi@raspberrypi:~ $ sudo apt autoremove
Leyendo lista de paquetes… Hecho
Creando árbol de dependencias
Leyendo la información de estado… Hecho
Los siguientes paquetes se ELIMINARÁN:
realpath
0 actualizados, 0 nuevos se instalarán, 1 para eliminar y 0 no actualizados.
Se liberarán 461 kB después de esta operación.
¿Desea continuar? [S/n] s
(Leyendo la base de datos … 143519 ficheros o directorios instalados actualmente.)
Desinstalando realpath (8.26-3) …
pi@raspberrypi:~ $ cd seeed-voicecard
bash: cd: seeed-voicecard: No existe el fichero o el directorio
pi@raspberrypi:~ $ git clone https://github.com/respeaker/seeed-voicecard.git
Cloning into ‘seeed-voicecard’…
remote: Enumerating objects: 46, done.
remote: Counting objects: 100% (46/46), done.
remote: Compressing objects: 100% (34/34), done.
remote: Total 688 (delta 19), reused 31 (delta 12), pack-reused 642
Receiving objects: 100% (688/688), 1.33 MiB | 1.04 MiB/s, done.
Resolving deltas: 100% (418/418), done.
pi@raspberrypi:~ $ cd seeed-voicecard
pi@raspberrypi:~/seeed-voicecard $ sudo ./install.sh
Obj:1 http://linux.teamviewer.com/deb stable InRelease
Obj:2 http://archive.raspberrypi.org/debian stretch InRelease
Obj:3 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Leyendo lista de paquetes… Hecho
Creando árbol de dependencias
Leyendo la información de estado… Hecho
Todos los paquetes están actualizados.
Leyendo lista de paquetes… Hecho
Creando árbol de dependencias
Leyendo la información de estado… Hecho
raspberrypi-kernel ya está en su versión más reciente (1.20190517-1).
raspberrypi-kernel-headers ya está en su versión más reciente (1.20190517-1).
0 actualizados, 0 nuevos se instalarán, 0 para eliminar y 0 no actualizados.
Leyendo lista de paquetes… Hecho
Creando árbol de dependencias
Leyendo la información de estado… Hecho
dkms ya está en su versión más reciente (2.3-2).
git ya está en su versión más reciente (1:2.11.0-3+deb9u4).
i2c-tools ya está en su versión más reciente (3.1.2-3).
libasound2-plugins ya está en su versión más reciente (1.1.1-1).
0 actualizados, 0 nuevos se instalarán, 0 para eliminar y 0 no actualizados.
------------------------------
Deleting module version: 0.3
completely from the DKMS tree.
------------------------------
Done.
Creating symlink /var/lib/dkms/seeed-voicecard/0.3/source ->
/usr/src/seeed-voicecard-0.3
DKMS: add completed.
Kernel preparation unnecessary for this kernel. Skipping…
Building module:
cleaning build area…
make -j4 KERNELRELEASE=4.19.42+ -C /lib/modules/4.19.42+/build M=/var/lib/dkms/seeed-voicecard/0.3/build…
cleaning build area…
DKMS: build completed.
snd-soc-wm8960:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.19.42+/kernel/sound/soc/codecs/
snd-soc-ac108.ko:
Running module version sanity check.
- Installing to /lib/modules/4.19.42+/kernel/sound/soc/codecs/
- Original module
- No original module exists within this kernel
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.19.42+/kernel/sound/soc/codecs/
snd-soc-seeed-voicecard.ko:
Running module version sanity check.
- Installing to /lib/modules/4.19.42+/kernel/sound/soc/codecs/
- Original module
- No original module exists within this kernel
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.19.42+/kernel/sound/soc/bcm/
depmod…
DKMS: install completed.
Kernel preparation unnecessary for this kernel. Skipping…
Building module:
cleaning build area…
make -j4 KERNELRELEASE=4.19.42-v7+ -C /lib/modules/4.19.42-v7+/build M=/var/lib/dkms/seeed-voicecard/0.3/build…
cleaning build area…
DKMS: build completed.
snd-soc-wm8960:
Running module version sanity check.
- Installing to /lib/modules/4.19.42+/kernel/sound/soc/bcm/
- Original module
- No original module exists within this kernel
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.19.42-v7+/kernel/sound/soc/codecs/
snd-soc-ac108.ko:
Running module version sanity check.
- Installing to /lib/modules/4.19.42-v7+/kernel/sound/soc/codecs/
- Original module
- No original module exists within this kernel
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.19.42-v7+/kernel/sound/soc/codecs/
snd-soc-seeed-voicecard.ko:
Running module version sanity check.
- Installing to /lib/modules/4.19.42-v7+/kernel/sound/soc/codecs/
- Original module
- No original module exists within this kernel
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.19.42-v7+/kernel/sound/soc/bcm/
depmod…
DKMS: install completed.
mkdir: no se puede crear el directorio «/etc/voicecard»: El fichero ya existe
setup git config
git init
Reinitialized existing Git repository in /etc/voicecard/.git/
git add --all
git commit -m “origin configures”
[master (root-commit) 50dc3e4] origin configures
7 files changed, 1476 insertions(+)
create mode 100644 ac108_6mic.state
create mode 100644 ac108_asound.state
create mode 100644 asound_2mic.conf
create mode 100644 asound_4mic.conf
create mode 100644 asound_6mic.conf
create mode 100644 dkms.conf
create mode 100644 wm8960_asound.state
------------------------------------------------------
Please reboot your raspberry pi to apply all settings
Enjoy!
------------------------------------------------------
pi@raspberrypi:~/seeed-voicecard $ reboot
These images show what happens after reboot:
<LINK_TEXT text=“https://www.dropbox.com/s/putdc6ylrpmsv … 5.jpg?dl=0”>https://www.dropbox.com/s/putdc6ylrpmsvyq/Bildschirmfoto%202019-06-27%20um%2022.14.45.jpg?dl=0</LINK_TEXT>
This is what happens when I try to use alexa:
<LINK_TEXT text=“https://www.dropbox.com/s/oap26vo5e3v2y … 2.jpg?dl=0”>https://www.dropbox.com/s/oap26vo5e3v2y30/Bildschirmfoto%202019-06-27%20um%2022.15.02.jpg?dl=0</LINK_TEXT>
What happens when using audacity:
<LINK_TEXT text=“https://www.dropbox.com/s/akwepjn6kos0c … 7.jpg?dl=0”>https://www.dropbox.com/s/akwepjn6kos0czf/Bildschirmfoto%202019-06-27%20um%2022.35.17.jpg?dl=0</LINK_TEXT>
<LINK_TEXT text=“https://www.dropbox.com/s/3r0lgxdskusdg … 0.jpg?dl=0”>https://www.dropbox.com/s/3r0lgxdskusdgck/Bildschirmfoto%202019-06-27%20um%2022.35.30.jpg?dl=0</LINK_TEXT>
- Installing to /lib/modules/4.19.42-v7+/kernel/sound/soc/bcm/
Hi there~
- If you use above image, you do not need to install the driver. You just need to run the arecord -L. Please also take a picture about your mics FPC cable connection in case the wrong connections as well. You can reboot one more time to check if you can see the sound card.
- We tested with latest kernel Linux raspberrypi 4.19.42-v7 and it works as well.
</s>(env1) pi@raspberrypi:~ voice-engine/examples $ uname -a
Linux raspberrypi 4.19.42-v7+ #1219 SMP Tue May 14 21:20:58 BST 2019 armv7l GNU/Linux
(env1) pi@raspberrypi:~ voice-engine/examples $ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: seeed8micvoicec [seeed-8mic-voicecard], device 0: bcm2835-i2s-ac10x-codec0 ac10x-codec.1-0035-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
(env1) pi@raspberrypi:~ oice-engine/examples $<e>
- we see some pulse audio issue and update the wiki page for the alexa interaction python scripts. you can check the wiki for the detail info. thanks.