dscripka / openWakeWord

An open-source audio wake word (or phrase) detection framework with a focus on performance and simplicity.
Apache License 2.0
763 stars 76 forks source link

Armbian armv7 orangepic onnxruntime #194

Open dzianisv opened 3 months ago

dzianisv commented 3 months ago

Could anyone guide me in direction how to install onnxruntime on armbian OrangePI PC armv7

root@orangepipc:/opt/VoiceAssistant# pip install openwakeword
Collecting openwakeword
  Downloading openwakeword-0.6.0-py3-none-any.whl (60 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 60.7/60.7 kB 508.5 kB/s eta 0:00:00
  Downloading openwakeword-0.5.1-py3-none-any.whl (16.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.7/16.7 MB 4.2 MB/s eta 0:00:00
  Downloading openwakeword-0.5.0-py3-none-any.whl (16.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.7/16.7 MB 4.4 MB/s eta 0:00:00
  Downloading openwakeword-0.4.0-py3-none-any.whl (9.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.3/9.3 MB 5.4 MB/s eta 0:00:00
  Downloading openwakeword-0.3.1-py3-none-any.whl (9.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.3/9.3 MB 5.2 MB/s eta 0:00:00
  Downloading openwakeword-0.3.0-py3-none-any.whl (9.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.3/9.3 MB 5.1 MB/s eta 0:00:00
  Downloading openwakeword-0.2.0-py3-none-any.whl (9.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 9.3/9.3 MB 4.9 MB/s eta 0:00:00
  Downloading openwakeword-0.1.1-py3-none-any.whl (5.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 5.8/5.8 MB 4.6 MB/s eta 0:00:00
ERROR: Cannot install openwakeword==0.1.1, openwakeword==0.2.0, openwakeword==0.3.0, openwakeword==0.3.1, openwakeword==0.4.0, openwakeword==0.5.0, openwakeword==0.5.1 and openwakeword==0.6.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    openwakeword 0.6.0 depends on onnxruntime<2 and >=1.10.0
    openwakeword 0.5.1 depends on onnxruntime<2 and >=1.10.0
    openwakeword 0.5.0 depends on onnxruntime<2 and >=1.10.0
    openwakeword 0.4.0 depends on onnxruntime<2 and >=1.10.0
    openwakeword 0.3.1 depends on onnxruntime<2 and >=1.10.0
    openwakeword 0.3.0 depends on onnxruntime<2 and >=1.10.0
    openwakeword 0.2.0 depends on onnxruntime<2 and >=1.10.0
    openwakeword 0.1.1 depends on onnxruntime<2 and >=1.10.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
(.venv) root@orangepipc:/opt/VoiceAssistant# uname -a
Linux orangepipc 6.1.63-current-sunxi #1 SMP Mon Nov 20 10:52:19 UTC 2023 armv7l GNU/Linux
(.venv) root@orangepipc:/opt/VoiceAssistant# lsb_release 
No LSB modules are available.
(.venv) root@orangepipc:/opt/VoiceAssistant# cat /etc/i
idmapd.conf      ifplugd/         init.d/          initramfs/       initramfs-tools/ inputrc          insserv.conf.d/  iproute2/        issue            issue.net
(.venv) root@orangepipc:/opt/VoiceAssistant# cat /etc/issue
Armbian 23.11.1 Bookworm \l 
dzianisv commented 3 months ago

Related, onnxruntime doesn't have a precompiled wheel on pypi https://github.com/microsoft/onnxruntime/issues/8874

dscripka commented 3 months ago

What version of Python are you using?

And yes, there are not precompiled wheels for onnxruntime on 32-bit ARM architectures. If your version of Armbian is 32-bit, you will have to build a wheel separately or try to install onnxruntime from source. If the Orange Pi supports a 64-bit version of Armbian (or another linux distribution), that will be much easier as aarch64 wheels are available for many libraries.

dzianisv commented 1 month ago

What version of Python are you using?

And yes, there are not precompiled wheels for onnxruntime on 32-bit ARM architectures. If your version of Armbian is 32-bit, you will have to build a wheel separately or try to install onnxruntime from source. If the Orange Pi supports a 64-bit version of Armbian (or another linux distribution), that will be much easier as aarch64 wheels are available for many libraries.

Could you please share the quick guide on how to build it? oranpipc is a cortex-a7 based, just armv7 supported.