Open main menu

Changes

Voice HAT Software

2,932 bytes added, 19:17, 18 November 2020
no edit summary
{{GD Template Impl}}
[[File:IMG-8960-interface.jpg|center700px]] We test it base on 2020-08-20-raspios-buster-armhf.img You must burn the last official Raspbian firmware firstly. * System update & upgrade sudo apt-get update sudo apt-get upgrade #Maybe you need update linux software source, and the source of the software depends on your country, you can use aliyu sortware source if you are in China. for example:<pre>sudo nano /etc/apt/sources.list #replace file comment with the following comment; #deb-src http://archive.raspberrypi.org/debian/ stretch maindeb http://mirrors.aliyun.com/raspbian/raspbian/ buster main contrib non-free rpideb-src http://mirrors.aliyun.com/raspbian/raspbian/ buster main contrib non-free rpi save&exit;</pre> *Check linux kernal version, and require kernal 5.4 or more version; sudo uname -a Linux raspberrypi 5.4.72-v7l+ #1356 SMP Thu Oct 22 13:57:51 BST 2020 armv7l GNU/Linux (this is the result of the above command)  *Setup WM8960 driver git clone --depth=1 https://github.com/respeaker/seeed-voicecard cd seeed-voicecard sudo ./install.sh #This will take about 30 minutes or so, depending on your network conditions reboot * Check play: aplay -l <pre>pi@raspberrypi:~/seeed-voicecard $ aplay -l**** List of PLAYBACK Hardware Devices ****card 0: 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 #7card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI] Subdevices: 1/1 Subdevice #0: subdevice #0card 1: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0</pre> * Check record arecord -l <pre>pi@raspberrypi:~/seeed-voicecard $ arecord -l**** List of CAPTURE Hardware Devices ****card 1: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0pi@raspberrypi:~/seeed-voicecard $</pre> * Record & play test sudo arecord -f cd -Dhw:1 | aplay -Dhw:1 #Ctrl+C to exit,  #Record to result file test.wav sudo arecord -D hw:1,0 -f S32_LE -r 16000 -c 2 test.wav #The result record file is test.wav, Ctrl+C to exit * Play the record result file sudo aplay -Dhw:1 test.wav * How to adjust volumn sudo alsamixer[[File:VOICE0HAT-3.png|700pxnone]] if the default sound card is not WM8960, please select it via press F6  * How to use the LED?Download file [[File:Voice-HAT.zip]], unzip it, then run the following command: cd Voice-HAT sudo python pixels.py * How to use the custom button?  sudo pip install rpi.gpio // install RPi.GPIO library Download [[File:Button.zip]], unzip it to get button.py file, <pre>pi@raspberrypi:~ $ python button.pyoffoffononoff</pre>   
Return [[Raspi Voice HAT]]
 
<!--Add review function! -->
<comments />
 
<!--Please choose the -->
<!--Remove other categories, just keep the appropriate categories -->
 
 
[[Category:Product Manual]]
[[Category:Raspberry pi]]
[[Category:Knowledge]]