zsh: exec format error: ./whisper-tiny.en.llamafile

#4
by dollarpound - opened

Unable to execute in Ubuntu 22

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS"
mozilla org

If you use zsh and have trouble running llamafile, try saying sh -c ./llamafile. This is due to a bug that was fixed in zsh 5.9+.

https://github.com/mozilla-ocho/llamafile/?tab=readme-ov-file#mac

jartine changed discussion status to closed

The executable worked, but inference failed.

Server log

whisper_model_load: qntvr         = 0
whisper_model_load: type          = 1 (tiny)
whisper_model_load: adding 1607 extra tokens
whisper_model_load: n_langs       = 99
whisper_model_load:      CPU total size =    77.11 MB
whisper_model_load: model size    =   77.11 MB
whisper_init_state: kv self size  =    9.44 MB
whisper_init_state: kv cross size =    9.44 MB
whisper_init_state: kv pad  size  =    2.36 MB
whisper_init_state: compute buffer (conv)   =   13.45 MB
whisper_init_state: compute buffer (encode) =   85.79 MB
whisper_init_state: compute buffer (cross)  =    4.14 MB
whisper_init_state: compute buffer (decode) =   96.15 MB

whisper server listening at http://127.0.0.1:8080

Received request: audio.mp3
ID3: converting to wav...
ID3: failed to open audio file: Resource does not exist (we support .wav, .mp3, .flac, and .ogg)
error: failed to read WAV file

Inference

~/Desktop/yt
➜ curl 127.0.0.1:8080/inference \
    -H "Content-Type: multipart/form-data" \
    -F file="@./audio.mp3" \
    -F temperature="0.0" \
    -F temperature_inc="0.2" \
    -F response_format="json"
{"error":"failed to read WAV file"}%
~/Desktop/yt
➜ lll
total 84M
-rw-rw-r-- 1 glasscube 2.6M Aug 29 23:44 vercel.m4a
-rw-rw-r-- 1 glasscube  74M Aug 29 23:45 output.wav
-rw-rw-r-- 1 glasscube 6.8M Aug 29 23:47 audio.mp3
drwxr-xr-x 4 glasscube 4.0K Aug 29 23:50 ../
drwxrwxr-x 2 glasscube 4.0K Aug 29 23:47 ./
~/Desktop/yt
mozilla org

No support in server for mp3s yet. You have to convert to s16 wav or use the cli.

Sign up or log in to comment