Difference between revisions of "Voice HAT Software"

From Geekworm Wiki
Jump to navigation Jump to search
 
Line 97: Line 97:
 
  sudo pip install rpi.gpio    // install RPi.GPIO library
 
  sudo pip install rpi.gpio    // install RPi.GPIO library
  
Download [[File::Button.zip]], unzip it to get button.py file,
+
Download [[File:Button.zip]], unzip it to get button.py file,
  
 
<pre>
 
<pre>

Latest revision as of 19:17, 18 November 2020

IMG-8960-interface.jpg

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:
sudo nano /etc/apt/sources.list

#replace file comment with the following comment; 
#deb-src http://archive.raspberrypi.org/debian/ stretch main
deb http://mirrors.aliyun.com/raspbian/raspbian/ buster main contrib non-free rpi
deb-src http://mirrors.aliyun.com/raspbian/raspbian/ buster main contrib non-free rpi

save&exit;
  • 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
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 #7
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: seeed2micvoicec [seeed-2mic-voicecard], device 0: bcm2835-i2s-wm8960-hifi wm8960-hifi-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
  • Check record
arecord -l
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 #0
pi@raspberrypi:~/seeed-voicecard $
  • 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
VOICE0HAT-3.png

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,

pi@raspberrypi:~ $ python button.py
off
off
on
on
off



Return Raspi Voice HAT

Add your comment
Geekworm Wiki welcomes all comments. If you do not want to be anonymous, register or log in. It is free.


Anonymous user #2

11 months ago
Score 0++

Installation doesn't work at all, driver not found, and the script is outdated, full of bugs.

E: Unable to locate package linux-raspi E: Unable to locate package linux-headers-raspi E: Unable to locate package linux-image-raspi (...) grep: /boot/kernel.img: No such file or directory gzip: stdin: unexpected end of file grep: /boot/kernel.img: No such file or directory

gzip: stdin: unexpected end of file

Walker

11 months ago
Score 0++
Hello, we haven't sold this product for a long time, can you provide your order number? , you can provide some pictures (about your question), preferably a video, and send it to our email. Please contact us at support@geekworm.com. We will try our best to help you solve the problem

Anonymous user #2

11 months ago
Score 0++
I have purchased it through Ebay, and I will send you some photos to your email address. I would really appreciate any help to make it work.

Walker

11 months ago
Score 0++
You're welcome

Anonymous user #1

30 months ago
Score 0++

Installed it and now after reboot, it comes up, but doesn't respond to ssh.

Did the install shutdown ssh access?

Anonymous user #1

30 months ago
Score 0++
...It also seems to have shutdown the osoyoo touch screen recognition.

Lisa

30 months ago
Score 0++
Hi,could you please tell us where you bought the product?