Follow this guide if you want to run the new Linux Voice Assistant on an Android tablet.
Prerequisite: the android version on the tablet should be 64bit (aarch64), this probably won’t work on 32bit android because of a tensorflow precompiled library that it is used.
- Install these apps: termux , termux:boot, termux:api.
Either F-droid or Google play versions will do, but do not mix them, install all termux apps from the same marketplace.
-
Go into Android settings and give all permissions to the three app, also make sure they can run in background, disabling the battery optimization for the apps.
-
Launch termux app on the tablet.
-
For easier access to the tablet we are going to install an ssh server. This command is to be run in the termux terminal (you will see
~ $as the terminal prompt):
pkg install openssh termux-tools termux-api
- Set a password for the user (in termux):
passwd
- Make sure the tablet does not go to sleep while installing (in termux):
termux-wake-lock
- Start sshd in termux
sshd
- You need to know the username in termux and the ip address of the tablet to connect, run this to know:
echo $USER
ifconfig
The first command gives you your username, the second the network setup. The IP shown for the wlan should be the one to use.
- No you can ssh into the wallpanel from a computer using port 8022 (from linux terminal it is like this):
ssh -p 8022 $USER@$TABLET_ADDRESS
This is not necessary but it makes it easier to copy and paste. If you don’t have access to an ssh client you can follow the guide directly in termux.
- Back in termux, will make sshd run at boot:
mkdir -p ~/.termux/boot
cat > ~/.termux/boot/00_start-sshd << EOF
#!/data/data/com.termux/files/usr/bin/sh
termux-wake-lock
sshd
EOF
chmod +x ~/.termux/boot/00_start-sshd
- As termux is not exactly linux we need to install a chroot to run the assistant. Install the required packages in termux:
pkg install pulseaudio proot-distro util-linux
- As we are going to use a chroot to install the assistant (the termux libc libraries are not compatible) and the chroot does not have access to the android hardware, we are going to use pulseaudio to forward it. Also it is needed to register the microphone source for this to work, and we want it to run at boot:
cat > ~/.termux/boot/20_pulseaudio << EOF
#!/data/data/com.termux/files/usr/bin/sh
pulseaudio --start --exit-idle-time=-1
pactl load-module module-sles-source
pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1
EOF
Make it executable:
chmod +x ~/.termux/boot/20_pulseaudio
And run it:
~/.termux/boot/20_pulseaudio
- Time to setup the chroot in termux:
proot-distro install debian
- Chroot into it:
proot-distro sh debian
Now you’ll see that the system prompt changes to root@localhost:~# when inside the chroot, it is a fake linux root environment (root only within termux).
- Update debian package list (this is run inside the chroot):
apt update
And install the required packages inside the chroot:
apt install git build-essential python3.13 python3.13-venv python3-lilv portaudio19-dev libmpv-dev
- Before continuing we need to make the soundcard accesible from the chroot:
export PULSE_SERVER=127.0.0.1
- Now follow the instructions from https://github.com/OHF-Voice/linux-voice-assistant, at the time of this guide writing, the process is this (all run inside the chroot):
Clone the repository:
git clone clone https://github.com/OHF-Voice/linux-voice-assistant.git
Go into the linux-voice-assistant directory:
cd linux-voice-assistant
And run the setup script (make sure you use python3.13):
python3.13 script/setup
- Still in the chroot, lets make an script to start the assistant from termux (you can change the assistant parameters to your liking):
cat > /root/assist.sh << EOF
#!/bin/sh
export PULSE_SERVER=127.0.0.1
/root/linux-voice-assistant/.venv/bin/python3.13 -m linux-voice-assistant --wake-model ok_nabu --name tabletAssist
EOF
Make it executable:
chmod +x /root/assist.sh
And try it:
/root/assist.sh
Finally, exit the chroot:
exit
- Back in the termux console, we make the assistant to start at boot:
cat > ~/.termux/boot/90_start-assist << EOF
#!/data/data/com.termux/files/usr/bin/sh
proot-distro sh debian -- /root/assist.sh
EOF
This should be all of it.
Make sure you open termux:boot app at least once before rebooting so it registers itself at boot.
Reboot the tablet to check if everything is ok on boot and finally setup the assistant from home assistant.
If you want to upload different wakewords or access the chroot files from outside the chroot (i.e. for uploading files directly using scp) the absolute path of the wakewords directory should be: /data/data/com.termux/files/usr/var/lib/proot-distro/installed-rootfs/debian/root/linux-voice-assistant/wakewords
My setup is working well on a pretty old Samsung tablet (galaxy tab A 10.1 from 2016) with the battery removed, flashed with a 64bit lineageos 15.1 (android 8.1) and the discontinued wallpanel from https://github.com/TheTimeWalker/wallpanel-android to access the home assistant dashboard.
Have not tried and don’t know how well it will perform on newer android versions as Android gets more aggressive with power saving on each one and it might kill termux in the background despite having the wakelock.