-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.sh
61 lines (46 loc) · 1.24 KB
/
install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
# this install script was tested with python 3.11.2
sudo apt update
sudo apt upgrade -y
sudo apt remove python3-rpi.gpio
sudo apt install -y git python3-pip python3-venv python3-rpi-lgpio i2c-tools sqlite3 mpg321 libasound-dev portaudio19-dev libportaudio2 libportaudiocpp0 ffmpeg python3-pyaudio flac python3-espeak espeak sox
sudo apt install -y python3-picamera2 --no-install-recommends
python3 -m venv --system-site-packages .venv
source .venv/bin/activate
pip3 install -r requirements.txt
source ./respeaker_install.sh
# mic hat with audio examples
git clone git@github.com:respeaker/mic_hat.git ~/mic_hat
sudo echo "defaults.pcm.rate_converter "samplerate"
pcm.!default {
type asym
playback.pcm "playback"
capture.pcm "capture"
}
pcm.playback {
type plug
slave.pcm "dmixed"
}
pcm.capture {
type plug
slave.pcm "mono_capture"
}
pcm.dmixed {
type dmix
slave.pcm "hw:seeed2micvoicec"
ipc_key 555555
}
pcm.mono_capture {
type route
slave {
pcm "hw:seeed2micvoicec"
channels 1
}
ttable.0.0 1
ttable.1.0 0
}" > /etc/asound.conf
# respeaker
git clone https://github.com/respeaker/seeed-voicecard ~/seeed-voicecard/
cd ~/seeed-voicecard
sudo ./install.sh
sudo reboot