I did make some progress, my network now requires tflite-runtime only, but the ds-ctcdecoder is not yet working. I was able to cross-build it and install a copy of it on my raspbian container image, but when I try to import it I get following error:
ImportError: cannot import name '_swigwrapper' from 'ds_ctcdecoder'
I did follow the steps from https://github.com/mozilla/DeepSpeech/issues/3379, built swig
on the raspi and replaced the original ds-swig
directory with it.
In the build process it seems the wrapper is added, but was built with the wrong architecture:
creating temp_build/temp_build/ds_ctcdecoder-0.10.0a3.dist-info/WHEEL
creating 'dist/ds_ctcdecoder-0.10.0a3-cp37-cp37m-linux_armv7l.whl' and adding 'temp_build/temp_build' to it
adding 'ds_ctcdecoder/__init__.py'
adding 'ds_ctcdecoder/_swigwrapper.cpython-37m-x86_64-linux-gnu.so'
adding 'ds_ctcdecoder/swigwrapper.py'
I did start the build with make TARGET=rpi3 NUM_PROCESSES=$(nproc) bindings
and I think the error is related to this build step:
/DeepSpeech/tensorflow/bazel-tensorflow/external/LinaroArmGcc72/bin/arm-linux-gnueabihf-c++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,--no-as-needed -march=armv7-a -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -D_GLIBCXX_USE_CXX11_ABI=0 --sysroot /DeepSpeech/multistrap-raspbian-buster -march=armv7-a -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard -D_GLIBCXX_USE_CXX11_ABI=0 --sysroot /DeepSpeech/multistrap-raspbian-buster -Wdate-time -D_FORTIFY_SOURCE=2 temp_build/temp_build/swigwrapper_wrap.o -o temp_build/temp_build/ds_ctcdecoder/_swigwrapper.cpython-37m-x86_64-linux-gnu.so first_party.a third_party.a
Do you know if there is some flag I did miss? Or something other I can change?