ReSpeaker 4-Mic Array, with Raspberry Pi 3B+

Moderators: violet, seth.welday

Post Reply
chancehuang2018
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Tue Nov 27, 2018 9:07 am

ReSpeaker 4-Mic Array, with Raspberry Pi 3B+

Post by chancehuang2018 » Tue Nov 27, 2018 1:23 pm

Hi there!
I'm a senior H/W engineer, but totally new to S/W stuffs!
I'm going to create a Home Automation project with ReSpeaker 4-Mic Array & Raspberry Pi 3B+, and experienced a major problem can't be solved yet.
I followed the steps from : http://wiki.seeedstudio.com/ReSpeaker_4 ... pberry_Pi/ .
The Audacity and "pixels_demo.py" worked fine.
However, the " kws_doa.py" had NO response!

My pi's response to "arecord -L":
pi@raspberrypi:~/seeed-voicecard $ arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
default
playback
ac108
sysdefault:CARD=seeed4micvoicec
seeed-4mic-voicecard,
Default Audio Device
dmix:CARD=seeed4micvoicec,DEV=0
seeed-4mic-voicecard,
Direct sample mixing device
dsnoop:CARD=seeed4micvoicec,DEV=0
seeed-4mic-voicecard,
Direct sample snooping device
hw:CARD=seeed4micvoicec,DEV=0
seeed-4mic-voicecard,
Direct hardware device without any conversions
plughw:CARD=seeed4micvoicec,DEV=0
seeed-4mic-voicecard,
Hardware device with all software conversions
pi@raspberrypi:~/seeed-voicecard $

It seems lack of "capture", "dmixed" & "array". Does this matter?

And after runing "kws_doa.py", the Audacity recording responsed "Device Busy". Looks the MIC resource was occupied. And I have to reboot to fix it.

Thank you for any comment & help!!

By the way, I ignored that problem and went next kws_doa.py demo. This was its response:
(env) pi@raspberrypi:~/4mics_hat $ python kws_doa.py
['arecord', '-t', 'raw', '-f', 'S16_LE', '-c', '4', '-r', '16000', '-D', 'default', '-q']

bill.yu
Elementary-3
Elementary-3
Posts: 354
Joined: Mon Apr 02, 2018 11:05 am

Re: ReSpeaker 4-Mic Array, with Raspberry Pi 3B+

Post by bill.yu » Thu Nov 29, 2018 4:05 pm

Hi there,

it does not matter about the "capture" text.

when you run the kws_doa.py, please say "snowboy" and you will get the direction. thanks.

(env) pi@raspberrypi:~/4mics_hat $ python kws_doa.py
['arecord', '-t', 'raw', '-f', 'S16_LE', '-c', '4', '-r', '16000', '-D', 'default', '-q']
detected 1 at direction 225.209292078
detected 1 at direction 225.209292078
detected 1 at direction 225.209292078

chancehuang2018
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Tue Nov 27, 2018 9:07 am

Re: ReSpeaker 4-Mic Array, with Raspberry Pi 3B+

Post by chancehuang2018 » Thu Nov 29, 2018 9:38 pm

Dear Mr. Yu,
Thanks for your reply!
I think I did follow the steps to install them.

The following works GOOD:
arecord -Dac108 -f S32_LE -r 16000 -c 4 hello.wav
aplay hello.wav

Here's the response:
(env) pi@raspberrypi:~/voice-engine $ cd ~/4mics_hat
(env) pi@raspberrypi:~/4mics_hat $ python kws_doa.py
['arecord', '-t', 'raw', '-f', 'S16_LE', '-c', '4', '-r', '16000', '-D', 'default', '-q']

There's still no response to "snowboy"!
Should I check anything else?
Thanks!!

bill.yu
Elementary-3
Elementary-3
Posts: 354
Joined: Mon Apr 02, 2018 11:05 am

Re: ReSpeaker 4-Mic Array, with Raspberry Pi 3B+

Post by bill.yu » Mon Dec 03, 2018 3:04 pm

Hi there,

Please try to play the snowboy audio file and see if it can detect it. thanks.

https://github.com/SeeedDocument/forum_ ... nowboy.wav

chancehuang2018
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Tue Nov 27, 2018 9:07 am

Re: ReSpeaker 4-Mic Array, with Raspberry Pi 3B+

Post by chancehuang2018 » Mon Dec 03, 2018 3:41 pm

Dear Mr. yu,
It works with your WAV file! Now, I can go further and explore more.
Thank you very much for your support!!

chancehuang2018
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Tue Nov 27, 2018 9:07 am

Re: ReSpeaker 4-Mic Array, with Raspberry Pi 3B+

Post by chancehuang2018 » Wed Dec 05, 2018 10:04 am

Dear Mr. Yu,
I went further with running "python ns_kws_doa_alexa_with_light.py" and got "avs.alexa:status code: 204". After saying "snowboy", it jumped out of a lot of DEBUG message. Then I asked "who are you?", the LEDs and console seemed response to the word. However, I did NOT hear any thing from speaker!
I'm 100% sure the speaker is OK, by playing "snowboy.wav". And the Internet connection is OK, too.
Should I hear Alexa talk from the speaker?
Thanks for your support!!

seeed techsupport team
Staff
Staff
Posts: 44
Joined: Mon Mar 19, 2018 11:40 am

Re: ReSpeaker 4-Mic Array, with Raspberry Pi 3B+

Post by seeed techsupport team » Thu Dec 06, 2018 2:55 pm

Hi there,

We have 3 players (mpv, mpg123 and gstreamer) to use. SpeechSynthesizer and Alerts prefer mpg123 which is more responsive. AudioPlayer likes gstreamer > mpv > mpg123. Gstreamer supports more audio format and works well on raspberry pi. We can also specify the player of AudioPlayer using the environment variable PLAYER. So please try below commands to enable the voice. thanks.

sudo apt install mpg123
PLAYER=mpg123 python ns_kws_doa_alexa_with_light.py

Post Reply