Skip to content
A few scripts and notes for running Zamia on a PI3
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Zamia on a Pi 3

Zamia a a version of Kaldi - speech to text This is a how-to for making it work on a pi 3 I used python 2.7 - not tried with python 3 yet. To make it work it really needs a good microphone. I used a respeaker 4 mic

Install Zamia

Dependencies -

curl -O
curl -O
curl -O

sudo dpkg -i libttspico-data_1.0+git20130326-3_all.deb
sudo dpkg -i libttspico0_1.0+git20130326-3_armhf.deb
sudo dpkg -i libttspico-utils_1.0+git20130326-3_armhf.deb

As root:

echo "deb ./" >/etc/apt/sources.list.d/zamia-ai.list
wget -qO - | sudo apt-key add -
apt-get update
apt-get install kaldi-chain-zamia-speech-de kaldi-chain-zamia-speech-en python-kaldiasr python-nltools pulseaudio-utils pulseaudio
apt-get install kaldi-chain-zamia-speech-en python-kaldiasr python-nltools pulseaudio-utils pulseaudio

Install pulse

This is copied from Radiodan

apt-get install pulseaudio -y
echo "*** Pulse Audio system mode"
adduser pi pulse
sed -i '/load-module module-native-protocol-unix/c load-module\ module-native-protocol-unix auth-anonymous=1\ socket=/tmp/pulseaudio-system.sock\nload-module module-native-protocol-tcp auth-anonymous=1 auth-ip-acl=;' /etc/pulse/

mkdir -p /home/pi/.config/pulse/
echo "default-server = unix:/tmp/pulseaudio-system.sock" >> /home/pi/.config/pulse/client.conf
chown -R pi:pi /home/pi/.config/pulse/
cp pulseaudio.service /etc/systemd/system/
systemctl enable pulseaudio

sudo systemctl start pulseaudio
sudo systemctl status pulseaudio

Install respeaker stuff

sudo nano /boot/config.txt






git clone
cd seeed-voicecard
sudo ./ 4mic
sudo reboot

check this there:

arecord -l


wget ''


If it crashes with terminate called after throwing an instance of 'std::bad_alloc' or similar, try increasing the swap size.


to e.g.


'Fix'? the VAD (it's a tiny change, but doesn't work without it)

sudo cp /usr/lib/python2.7/dist-packages/nltools/

Install deps

pip install nltk

start it up automatically

You'll need to edit for your own code

sudo cp speaky.service /lib/systemd/system/
sudo systemctl enable speaky.service 
sudo systemctl start speaky.service
You can’t perform that action at this time.