whispercpp icon indicating copy to clipboard operation
whispercpp copied to clipboard

Erron when running on Debian ARM64

Open lucianomotti opened this issue 2 years ago • 4 comments
trafficstars

Hi,

I'm trying to run the code from a Debian ARM64 on AWS.

After installing using pip install whispercpp, I executed the following code:

from whispercpp import Whisper

print(f'STT Starting')
w = Whisper.from_pretrained("tiny")
w.transcribe_from_file("/etc/stt/audio.wav")

And it fails with this trace:

STT Starting
Traceback (most recent call last):
  File "/etc/stt/stt.py", line 4, in <module>
    w = Whisper.from_pretrained("tiny")
  File "/usr/local/lib/python3.9/dist-packages/whispercpp/__init__.py", line 105, in from_pretrained
    context = api.Context.from_file(
  File "/usr/local/lib/python3.9/dist-packages/whispercpp/utils.py", line 144, in __getattr__
    self._module = self._load()
  File "/usr/local/lib/python3.9/dist-packages/whispercpp/utils.py", line 122, in _load
    module = importlib.import_module(self.__name__)
  File "/usr/lib/python3.9/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 666, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 565, in module_from_spec
  File "<frozen importlib._bootstrap_external>", line 1108, in create_module
  File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
ImportError: /usr/local/lib/python3.9/dist-packages/whispercpp/api_cpp2py_export.so: invalid ELF header

Am I missing something?

lucianomotti avatar Mar 28 '23 20:03 lucianomotti

oh this arm wheels is broken. what version of the package you are using?

aarnphm avatar Mar 28 '23 21:03 aarnphm

oh this arm wheels is broken. what version of the package you are using?

Hi, I am using whispercpp-0.0.17:

Using cached whispercpp-0.0.17-cp39-cp39-linux_aarch64.whl
Installing collected packages: whispercpp
Successfully installed whispercpp-0.0.17

lucianomotti avatar Mar 29 '23 13:03 lucianomotti

can you try to do pip install git+https://github.com/aarnphm/whispercpp.git for now?

aarnphm avatar Mar 31 '23 03:03 aarnphm

Hey I'm having the same issue on ARM64 (specifically Jetson Nano). Also yes, I tried installing with the git+ command, didn't work and got the following:

(env) codethazine@codethazine-desktop:~/Documents/quba$ pip install git+https://github.com/aarnphm/whispercpp.git
Collecting git+https://github.com/aarnphm/whispercpp.git
  Cloning https://github.com/aarnphm/whispercpp.git to /tmp/pip-req-build-9cx5jd25
  Running command git clone --filter=blob:none --quiet https://github.com/aarnphm/whispercpp.git /tmp/pip-req-build-9cx5jd25
  Resolved https://github.com/aarnphm/whispercpp.git to commit 00f331b54be5dddaa4eb1611b5f533f8d29f18c1
  Running command git submodule update --init --recursive -q
  fatal: remote error: upload-pack: not our ref c9d5095f0c64455b201f1cd0b547efcf093ee7c3
  fatal: The remote end hung up unexpectedly
  Fetched in submodule path 'extern/whispercpp/bindings/ios', but it did not contain c9d5095f0c64455b201f1cd0b547efcf093ee7c3. Direct fetching of that commit failed.
  Failed to recurse into submodule path 'extern/whispercpp'
  error: subprocess-exited-with-error
  
  × git submodule update --init --recursive -q did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× git submodule update --init --recursive -q did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

codethazine avatar Jan 07 '24 16:01 codethazine