Difference between revisions of "ReSpeaker 4-Mic Array for Raspberry Pi"
(→Pour Raspberry Pi) |
(→section 8) |
||
| (29 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
== ReSpeaker 4-Mic Array == | == ReSpeaker 4-Mic Array == | ||
| − | === | + | === Version pour Raspberry Pi === |
[[File:ReSpeaker_01.jpg|300px]] | [[File:ReSpeaker_01.jpg|300px]] | ||
[[File:ReSpeaker_02.png|500px]] | [[File:ReSpeaker_02.png|500px]] | ||
| − | === | + | === Montage === |
| − | === section | + | [[File:ReSpeaker_04.jpg |300px]] |
| + | [[File:ReSpeaker_03.jpg |400px]] | ||
| + | |||
| + | |||
| + | ---- | ||
| + | |||
| + | Assurez-vous que les broches sont correctement alignés. | ||
| + | |||
| + | Attention '''le branchement à chaud peut endommager ReSpeaker''' . | ||
| + | |||
| + | Veuillez faire l’assemblage avec le Raspberry Pi une fois cette dernière éteint ('''Power Off''') | ||
| + | === Step 1. === | ||
| + | installation des pilotes | ||
| + | |||
| + | The AC108 codec is not supported by Pi kernel builds currently, we have to build it manually. | ||
| + | |||
| + | '''1.''' Please Make sure running the lastest Raspbian Operating System(debian 9) on Pi. (updated at 2018.6.27) | ||
| + | |||
| + | === Step 2. === | ||
| + | '''2.''' Get the seeed voice card source code. | ||
| + | <pre> | ||
| + | sudo apt-get update | ||
| + | sudo apt-get upgrade | ||
| + | git clone https://github.com/respeaker/seeed-voicecard.git | ||
| + | cd seeed-voicecard | ||
| + | sudo ./install.sh | ||
| + | reboot | ||
| + | </pre> | ||
| + | |||
| + | === Step 3 === | ||
| + | '''3.''' Then select the headphone jack on Raspberry Pi for audio output: | ||
| + | <pre> | ||
| + | sudo raspi-config | ||
| + | # Select 7 Advanced Options | ||
| + | # Select A4 Audio | ||
| + | # Select 1 Force 3.5mm ('headphone') jack | ||
| + | # Select Finish | ||
| + | </pre> | ||
| + | |||
| + | === Step 4. === | ||
| + | '''4.''' Check that the sound card name looks like this: | ||
| + | <pre> | ||
| + | |||
| + | pi@raspberrypi:~/seeed-voicecard $ arecord -L | ||
| + | null | ||
| + | Discard all samples (playback) or generate zero samples (capture) | ||
| + | playback | ||
| + | capture | ||
| + | dmixed | ||
| + | array | ||
| + | ac108 | ||
| + | default:CARD=seeed4micvoicec | ||
| + | seeed-4mic-voicecard, | ||
| + | Default Audio Device | ||
| + | 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 | ||
| + | </pre> | ||
| + | If we want to change the alsa settings, we can use | ||
| + | <pre> | ||
| + | sudo alsactl --file=ac108_asound.state store | ||
| + | </pre> | ||
| + | to save it. And when we need to use the settings again, copy it to: | ||
| + | <pre> | ||
| + | sudo cp ~/seeed-voicecard/ac108_asound.state /var/lib/alsa/asound.state | ||
| + | </pre> | ||
| + | |||
| + | === Step 5. === | ||
| + | '''5.''' Open Audacity and select '''AC108 & 4 channels''' as input and '''bcm2835 alsa: - (hw:0:0)''' as output to test: | ||
| + | <pre> | ||
| + | $ sudo apt update | ||
| + | $ sudo apt install audacity | ||
| + | $ audacity // run audacity | ||
| + | </pre> | ||
| + | |||
| + | [[File:audacity.jpg|600px]] | ||
| + | |||
| + | === Step 6. === | ||
| + | '''6.''' Or we could record with '''arecord''' and play with '''aplay''': | ||
| + | <pre> | ||
| + | arecord -Dac108 -f S32_LE -r 16000 -c 4 hello.wav // only support 4 channels | ||
| + | aplay hello.wav // make sure default device | ||
| + | // Audio will come out via audio jack of Raspberry Pi | ||
| + | |||
| + | </pre> | ||
| + | |||
| + | === section 8 === | ||
| + | http://wiki.seeedstudio.com/ReSpeaker_4_Mic_Array_for_Raspberry_Pi/ | ||
| + | |||
| + | [http://wiki.seeedstudio.com/ReSpeaker_4_Mic_Array_for_Raspberry_Pi/ ReSpeaker_4_Mic_Array_for_Raspberry_Pi] | ||
Latest revision as of 23:36, 11 August 2018
Contents
ReSpeaker 4-Mic Array
Version pour Raspberry Pi
Montage
Assurez-vous que les broches sont correctement alignés.
Attention le branchement à chaud peut endommager ReSpeaker .
Veuillez faire l’assemblage avec le Raspberry Pi une fois cette dernière éteint (Power Off)
Step 1.
installation des pilotes
The AC108 codec is not supported by Pi kernel builds currently, we have to build it manually.
1. Please Make sure running the lastest Raspbian Operating System(debian 9) on Pi. (updated at 2018.6.27)
Step 2.
2. Get the seeed voice card source code.
sudo apt-get update sudo apt-get upgrade git clone https://github.com/respeaker/seeed-voicecard.git cd seeed-voicecard sudo ./install.sh reboot
Step 3
3. Then select the headphone jack on Raspberry Pi for audio output:
sudo raspi-config
# Select 7 Advanced Options
# Select A4 Audio
# Select 1 Force 3.5mm ('headphone') jack
# Select Finish
Step 4.
4. Check that the sound card name looks like this:
pi@raspberrypi:~/seeed-voicecard $ arecord -L null Discard all samples (playback) or generate zero samples (capture) playback capture dmixed array ac108 default:CARD=seeed4micvoicec seeed-4mic-voicecard, Default Audio Device 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
If we want to change the alsa settings, we can use
sudo alsactl --file=ac108_asound.state store
to save it. And when we need to use the settings again, copy it to:
sudo cp ~/seeed-voicecard/ac108_asound.state /var/lib/alsa/asound.state
Step 5.
5. Open Audacity and select AC108 & 4 channels as input and bcm2835 alsa: - (hw:0:0) as output to test:
$ sudo apt update $ sudo apt install audacity $ audacity // run audacity
Step 6.
6. Or we could record with arecord and play with aplay:
arecord -Dac108 -f S32_LE -r 16000 -c 4 hello.wav // only support 4 channels aplay hello.wav // make sure default device // Audio will come out via audio jack of Raspberry Pi
section 8
http://wiki.seeedstudio.com/ReSpeaker_4_Mic_Array_for_Raspberry_Pi/