I managed to get DeepSpeech working on my quad-core Arm A53 aarch64 board and the command line invocation works fine. as shown here :
deepspeech --model deepspeech-0.9.0-models.tflite --scorer deepspeech-0.9.1-models.scorer --audio audio/2830-3980-0043.wav
(I had to compile and install Tensorflow-lite for aarch64 from source)
Now I’m trying to use microphone streaming and need to refer deepspeech executable in python as ‘import deepspeech’
Since pip3 was not used to install deepspeech (it does n’t install for aarch64 ), the import gives error.
How to import the deepspeech (instead of command line call) in python?
I tried importlib etc to setup search paths but no success.
Any pointers?
Thanks in advance.
lissyx
((slow to reply) [NOT PROVIDING SUPPORT])
2
why? we provide binaries.
pypi can’t host aarch64 wheels, so you need to use github published wheels:
Regarding Tensorflow, while trying resolve install issues, Tensorflow website clearly mentioned that only way to get it to work on aarch64 is to build from sources as no pre-built binaries were available for aarch64. I tried online searching for these binaries but could n’t find these links.
lissyx
((slow to reply) [NOT PROVIDING SUPPORT])
4
You don’t need to install TensorFlow for running any DeepSpeech inference. Our binaries are cross-built for Aarch64 and linked statically to the required TensorFlow code.
Yes, I was aware that only Buster is supported for aarch64.
In my tiny < $20 H6 based SBC, Armbian Focal works better than Buster with faster everything but unfortunately I can n’t use it with DeepSpeech as of now.
lissyx
((slow to reply) [NOT PROVIDING SUPPORT])
8
Well, cross-building is documented, follow the steps ?
I want to cross-compile for my Rpi4 with Ubuntu-Focal server (20.04.1) which has default py3.8 and aarch64 as I expect it to perform better.
But the setup & configs that are mentioned seem to support only Buster and A53 and not anything other than it. What would be the config for rpi4 and aarch64-A72 architecture?
Appreciate any pointers towards this setup.
Quote from your cross-compile documentation:
The deepspeech binary can also be cross-built, with TARGET=rpi3 or TARGET=rpi3-armv8 . This might require you to setup a system tree using the tool multistrap and the multitrap configuration files: native_client/multistrap_armbian64_buster.conf and native_client/multistrap_raspbian_buster.conf . The path of the system tree can be overridden from the default values defined in definitions.mk through the RASPBIANmake variable.
lissyx
((slow to reply) [NOT PROVIDING SUPPORT])
10
First, read more carefully, we also have Linux/Aarch64 builds that will should fine on RPi4 with Aarch64 system. There was no official RPi4 64-bits release available when we did it.
Second, you need to read and understand the documentation you quoted. Specifically, if your need is running on focal/aarch64, just use the rpi3-armv8 flow and adapt multistrap config.