Hello this is a cross post of: Raspbery Pi 64 / Python 3.9 google.protobuf.message.DecodeError with pypi precise-runner binary · Issue #234 · MycroftAI/mycroft-precise · GitHub
Describe the bug
I’m porting my working code from Jetson Nano (Debian 18.02, Python 3.6) to Raspberry Pi4 (Debian 20.04, Aarch64, Python 3.9), but I’m getting a google.protobuf.message.DecodeError that prevents the engine from starting.
To get set up quickly I used the binary suggested from the readme.md
Should I try building from source, or is there something easier I’m missing?
To Reproduce
Install process
$ sudo apt install portaudio19-dev python3-pyaudio
$ wget https://github.com/MycroftAI/mycroft-precise/releases/download/v0.3.0/precise-engine_0.3.0_aarch64.tar.gz
$ tar xvf precise-engine_0.3.0_aarch64.tar.gz
$ sudo pip3 install precise-runner
$ wget https://github.com/MycroftAI/precise-data/blob/models/hey-mycroft.pb -P /home/robud/robud/ai/wakeword_detection/models/
$ wget https://github.com/MycroftAI/precise-data/blob/models/hey-mycroft.pb.params -P /home/robud/robud/ai/wakeword_detection/models/
When I run the code below, I get the subsequent error.
engine = PreciseEngine(PRECISE_EXE_PATH, PRECISE_MODEL_PATH)
detector = TriggerDetector(CHUNK, SENSITIVITY, TRIGGER_LEVEL)
engine.start()`
Warning: Failed to load parameters from /home/robud/robud/ai/wakeword_detection/models/hey-mycroft.pb.params
Traceback (most recent call last):
File "precise/scripts/engine.py", line 64, in <module>
File "precise/scripts/engine.py", line 52, in main
File "precise/network_runner.py", line 94, in __init__
File "precise/network_runner.py", line 43, in __init__
File "precise/network_runner.py", line 55, in load_graph
File "google/protobuf/message.py", line 187, in ParseFromString
File "google/protobuf/internal/python_message.py", line 1145, in MergeFromString
File "google/protobuf/internal/python_message.py", line 1210, in InternalParse
File "google/protobuf/internal/decoder.py", line 702, in DecodeRepeatedField
File "google/protobuf/internal/python_message.py", line 1210, in InternalParse
File "google/protobuf/internal/decoder.py", line 591, in DecodeField
google.protobuf.message.DecodeError: Truncated string.
[5149] Failed to execute script engine
Environment (please complete the following information):
- Device type: Raspberry Pi 4, 8GB
- OS: Raspberry Pi OS 11 (bullseye) Aarch64
- precise-runner==0.3.1
- protobuf==3.19.6
- tensorboard==2.10.1
- tensorboard-data-server==0.6.1
- tensorboard-plugin-wit==1.8.1
- tensorflow @ https://github.com/PINTO0309/Tensorflow-bin/releases/download/v2.10.0/tensorflow-2.10.0-cp39-none-linux_aarch64.whl
- tensorflow-estimator==2.10.0
- tensorflow-io-gcs-filesystem==0.27.0
Additional context
Thank you!