Replies: 2 comments
-
|
Folks, I worked pretty hard with copilot on this solution and holey crap, it works! I had a bunch of problems getting the HA to recognize the device, but that was because it was never fully starting because the |
Beta Was this translation helpful? Give feedback.
-
|
Thank you for this and well done! I gave it a go once to get support on a pi zero (1), but gave up. Will try. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Running linux-voice-assistant on Raspberry Pi 2B (armhf/armv7l) — Full Guide
Hardware
Problem 1: Wrong ELF class —
libtensorflowlite_c.sois x86-64Error:
The
pymicro-wakewordPyPI wheel (and even thelinux_armv7lwheel from piwheels) ships an x86-64libtensorflowlite_c.so. The upstream source for this library is https://github.com/tphakala/tflite_c, which only publisheslinux_amd64,linux_arm64,darwin_arm64, andwindows_amd64— no armhf build.Fix: Cross-compile from source on an x86 machine using Docker
The TFLite version used is
v2.17.1(confirmed viatphakala/tflite_crelease tags).Run this on a Mac or Linux x86 machine with Docker:
Verify it's correct:
Copy to the Pi:
Problem 2: Wake word never detects —
uint8quantization bugSymptom: The service starts, mic audio is received, but the wake word never triggers. All TFLite inference returns probability
0.0000.Root cause: A bug in
pymicro_wakeword/microwakeword.pyline 207. The quantization formula usesinput_zero_point = -128, which produces values in the range[-128, 127]. Casting this tonp.uint8silently clips all negative values to0, completely corrupting the input tensor. Inference runs successfully but on garbage data, producing all-zero output.Fix:
sed -i 's/\.astype(np\.uint8)/.astype(np.int8)/g' \ .venv/lib/python3.13/site-packages/pymicro_wakeword/microwakeword.pyProblem 3: Audio input device not selected
The service defaulted to no explicit input device. With PulseAudio, the device name must match exactly what
soundcardreports. Add to/etc/systemd/system/linux-voice-assistant.service:To find the correct name for your device:
Problem 4: Wrong wake word configured
preferences.jsondefaulted tookay_computerandhey_mycroft. Update it:{ "active_wake_words": ["okay_nabu"], "volume": 1.0, "thinking_sound": 1 }Also note: the wake word model file is named
okay_nabu(notok_nabu).Additional notes
pyopen_wakeword/lib/libtensorflowlite_c.soalso ships as x86-64 with the same BuildID. If you switch to theopenWakeWordengine, the same.soreplacement procedure applies.micro_features_cppfeature extractor (pymicro-featurespackage) installs correctly as a 32-bit armhf binary from piwheels — no fix needed there.Beta Was this translation helpful? Give feedback.
All reactions