gooofy / zamia-speech

Open tools and data for cloudless automatic speech recognition
GNU Lesser General Public License v3.0
443 stars 86 forks source link

Raspberry Pi 4 Raspbian Buster Installation #76

Open OTTStreamingVideo opened 4 years ago

OTTStreamingVideo commented 4 years ago

Thank you for the excellent work!

In order to install samia-speech on a RPi4 with Raspbian Buster, the changes below were made to the steps in https://github.com/gooofy/zamia-speech#raspbian-9-stretch-on-a-raspberry-pi-23.

  1. Create /etc/apt/sources.list.d/zamia-ai.list

    sudo touch /etc/apt/sources.list.d/zamia-ai.list

    add:

    deb https://goofy.zamia.org/repo-ai/raspbian/stretch/armhf/ ./

    (not amd64)

  2. Manually install libttspico0_1.0+git20130326-9_armhf.deb and libttspico-

    utils_1.0+git20130326-9_armhf.deb

    wget http://ftp.us.debian.org/debian/pool/non-free/s/svox/libttspico0_1.0+git20130326-9_armhf.deb

    wget http://ftp.us.debian.org/debian/pool/non-free/s/svox/libttspico-utils_1.0+git20130326-9_armhf.deb

    sudo apt-get install gdebi

    sudo gdebi libttspico0_1.0+git20130326-9_armhf.deb

    sudo gdebi libttspico-utils_1.0+git20130326-9_armhf.deb

  3. Install programs

    wget -qO - http://goofy.zamia.org/repo-ai/raspbian/stretch/armhf/bofh.asc | sudo apt-key add -

    sudo apt-get update

    sudo apt-get install kaldi-chain-zamia-speech-de kaldi-chain-zamia-speech-en python-kaldiasr python-nltools pulseaudio-utils pulseaudio

  4. Start pulseaudio

    pulseaudio --start --verbose I: [pulseaudio] main.c: Daemon startup successful.

  5. Verify pulseaudio

    pactl info

  6. Find name of USB microphone

    pactl list sources

    (look for line starting with "Description:" and use first word in python command line for Live Mic Demo)

The steps in https://github.com/gooofy/zamia-speech#wave-file-decoding-demo work fine.

The steps in https://github.com/gooofy/zamia-speech#live-mic-demo work fine (using the first word found in the "Description:" line).

The Live Mic Demo CPU usage shown in the Linux "top" command in Irix mode (SHIFT-I) was under 10%, which appears to be low enough to use reliably with other application processes.

The accuracy of the Live Mic Demo appears adequate for speech commands. In my opinion, this is a significant step forward for useful speech recognition running on a low cost processor such as the RPi4 with no dependence upon external services.

svenha commented 4 years ago

Thanks for sharing your experience. Which RAM version of Pi 4 are you using? How much is consumed by ASR processes?

OTTStreamingVideo commented 4 years ago

This was done with the 4 GB RAM version of the RPi4.

Please see the screenshot of the Linux "top" command:

kaldi_decode_live_screenshot_2019-09-29 07-24-44

bonsi commented 4 years ago

Thanks @OTTStreamingVideo, your instructions worked like a charm on my Pi 4!

sepia-assistant commented 4 years ago

Is there any updated official documentation for 'Raspberry Pi 4 Raspbian Buster' yet? Do the Raspbian Stretch binaries from step 1 actually work on the Pi4?

dolomiti70 commented 3 years ago

The repo ist not available anymore. Where can i find the new one.

pguyot commented 2 years ago

You can find precompiled binaries for Raspberry Pi here:

https://github.com/pguyot/kaldi/releases https://github.com/pguyot/py-kaldi-asr/releases