[TO SOLVE LATER] ReSpeaker 4 mic Array and Audio Recoding

Hello, i’m trying to use Rhasspy with my seeedvoice ReSpeaker 4 mics array.

I’m unable to configure Audio Recording.
With pyaudio i got this :

rhasspy-microphone-pyaudio-hermes: error: argument --device-index: invalid int value: ‘default:CARD=seeed4micvoicec’

Or if i use default setting i got :

EBUG:2020-10-12 21:05:18,793] rhasspymicrophone_pyaudio_hermes: Connected to MQTT broker
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
[DEBUG:2020-10-12 21:05:18,794] rhasspymicrophone_pyaudio_hermes: Subscribed to hermes/asr/stopListening
[DEBUG:2020-10-12 21:05:18,795] rhasspymicrophone_pyaudio_hermes: Subscribed to rhasspy/audioServer/getDevices
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
[DEBUG:2020-10-12 21:05:18,796] rhasspymicrophone_pyaudio_hermes: Subscribed to hermes/asr/startListening
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
[DEBUG:2020-10-12 21:05:18,798] rhasspymicrophone_pyaudio_hermes: Subscribed to hermes/audioServer/toggleSummaryOff
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
[DEBUG:2020-10-12 21:05:18,799] rhasspymicrophone_pyaudio_hermes: Subscribed to hermes/audioServer/toggleSummaryOn
ALSA lib pulse.c:242:(pulse_connect) PulseAudio: Unable to connect: Connection refused

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

ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_dmix.c:1108:(snd_pcm_dmix_open) unable to open slave
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
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
[ERROR:2020-10-12 21:05:18,833] rhasspymicrophone_pyaudio_hermes: record
Traceback (most recent call last):
File “/usr/lib/rhasspy/rhasspy-microphone-pyaudio-hermes/rhasspymicrophone_pyaudio_hermes/init.py”, line 111, in record
input=True,
File “/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/pyaudio.py”, line 750, in open
stream = Stream(self, *args, **kwargs)
File “/usr/lib/rhasspy/.venv/lib/python3.7/site-packages/pyaudio.py”, line 441, in init
self._stream = pa.open(**arguments)
OSError: [Errno -9996] Invalid input device (no default output device)
[DEBUG:2020-10-12 21:05:18,839] rhasspymicrophone_pyaudio_hermes: -> AudioRecordError(error=’[Errno -9996] Invalid input device (no default output device)’, site_id=‘salon’, context=‘Device index: None’, session_id=None)
[DEBUG:2020-10-12 21:05:18,840] rhasspymicrophone_pyaudio_hermes: Publishing 145 bytes(s) to hermes/error/audioServer/record

Or with arecord i got this :

The arecord: main:828: audio open error: Device or resource busy

to start this module without error is to use arecord with "Pulse audio server (pulse) " settings as device

But I still got an error:

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

arecord: main:828: audio open error: Connection refused

I think the only way to use respeaker is to use “pulse audio server (pulse)” in decice setting.
And
I think it is a permissions problem betwen docker and pulse-access group

So i see to have access to alsa we use this argument : -decive /dev/snd:/dev/snd
It should be something
like this fort pulse audio ?

Thank you !

I use my respeaker4 mic just fine without having to play around with pulse. Most likely you ran into a driver problem, there are plenty of those with the respeaker drivers. They seem to finally release new official drivers, I haven’t tested those yet. I personally still run on the fixed drivers HinTak did a few weeks ago, the link should be in quite a few issues of the respeaker repository if you want to try it.

Pulse and rhasspy don’t seem to work together so trying to solve anything with pulse is a bad idea.

Hello, so what I should do ?
uninstall pulse audio ?
i try with ps3 eye microphone and it work well.
I don’t know which choose if I’m able to do respeaker work.

I would suggest taking a spare sd card, installing just a raspi os lite on it, the respeaker drivers and rhasspy and then test if it works. If it does work, copy any configurations you have made and want to keep over. removing pulse audio once it is installed is not something I would know how to help you with, I never had it on any pi, I just know it causes problems from reading this forum.

Hello, i made fresh install of raspberry os and at this moment I only use ps3 eye microphone. I can hide the RPi and let the PS3 Eye on the table.

I will add a satellite in the further with a RPi Zero. I will see in few weeks to find a solution.

Thank you !

Is there any solution now?

I am not able to install the 4-mic array on my Raspberry 3 with up-to-date raspbian. I am using the --compat-kernel argument when installing seeed drivers.

Still, when trying arecord I am running into the main 828 error: device or resource busy - even when it should not be busy.

I guess:
rhasspy is running (docker?, systemd?)
So, if you try to use arecord, this error is thrown.

Test Micro

  • Stop rhasspy

  • Try:

    arecord -f cd -Dhw:1 | aplay -Dhw:1
    

This should make noise. If an error is throw (Invalid value for card), then try 0 (zero) instead of 1 (one)
Then:

  arecord -f cd -Dhw:1 test.wav
  aplay test.wav

Test Rhasspi

In rhasspy -> audio recording -> device:

  sysdefault:CARD=seeed4micvoicec

Good Luck
Kay

1 Like