Difference between revisions of "Voice HAT Software"

From Geekworm Wiki
Jump to navigation Jump to search
Line 25: Line 25:
  
 
*Check linux kernal version, and require kernal 5.4 or more version;
 
*Check linux kernal version, and require kernal 5.4 or more version;
  sudo uname --all
+
  sudo uname -a
  Linux raspberrypi 5.4.72-v7l+ #1356 SMP Thu Oct 22 13:57:51 BST 2020 armv7l GNU/Linux
+
  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)
  
  
1. Setup
+
*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 #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
 +
</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 #0
 +
pi@raspberrypi:~/seeed-voicecard $
 +
</pre>
 +
 
 +
* Record & play test
 +
sudo arecord -f cd -Dhw:1 | aplay -Dhw:1
 +
#Ctrl+C to exit,
 +
 
 +
#Recore to result file test.wav
 +
sudo arecord -D hw:1,0 -f S32_LE -r 16000 -c 2 test.wav
 +
#The result recore 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|none]]
 +
 
  
 
<!--Add review function! -->
 
<!--Add review function! -->

Revision as of 19:05, 18 November 2020

IMG-8960-interface.jpg

Return Raspi Voice HAT

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,
#Recore to result file test.wav
sudo arecord -D hw:1,0 -f S32_LE -r 16000 -c 2 test.wav
#The result recore 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


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

12 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

12 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

12 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

12 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?