Skip to content

Whisper's prepare_audio raises LibsndfileError on WebM/MP4 uploads and unloads the whisper worker #150

Description

@jeffreywangcf

Environment

  • OpenArc 2.0.5 (e5edf42-dirty), image ghcr.io/searchsavior/openarc-battlemage:latest
  • Kernel 6.19.12-200.fc43.x86_64, Arc Pro B50 single dGPU exposed to the container
  • Loaded models: whisper-large-v3 (fp16 IR, engine ovgenai, device GPU) and kokoro (fp16 IR, engine openvino, device GPU)
  • Clients: OpenWebUI 0.10.2 voice chat and OpenWhispr, both pointed at http://<host>:4001/v1 (OpenArc running in Docker on <host>)

What I was doing

Adding OpenWhispr dictation on top of a working OpenWebUI voice-chat setup. OpenWhispr (STT client) got:

External: 400, message='Bad Request', url='http://<host>:4001/v1/audio/transcriptions'

Subsequent requests to the same endpoint returned {"detail":"Model 'whisper-large-v3' is not loaded"}.

Triage

Monitored the container while triggering one dictation:

docker logs -f openarc 2>&1 | grep -iE "whisper|libsndfile|unload"

The dictation produced:

2026-07-22 08:09:18,830 - ERROR - Whisper inference failed!
  File "/app/src/server/worker_registry.py", line 173, in infer_whisper
    async for item in whisper_model.transcribe(packet.gen_config)
  File "/app/src/engine/ov_genai/whisper.py", line 44, in transcribe
  File "/app/src/engine/ov_genai/whisper.py", line 34, in prepare_audio
    audio, sr = librosa.load(audio_buffer, sr=16000, mono=True)
  ...
soundfile.LibsndfileError: Error opening <_io.BytesIO object at 0x7fecc199dee0>: Format not recognised.
2026-07-22 08:09:18,834 - ERROR - [Whisper Worker: whisper-large-v3] Inference failed, triggering model unload...

Cause

prepare_audio in src/engine/ov_genai/whisper.py decodes uploads via librosa.load, which does not support MP4 or WebM, so a client uploading either format errors out and unloads the model until it is manually reloaded. This also breaks other services sharing the endpoint.

Possible Fix

  • install ffmpeg in the Dockerfile
  • in prepare_audio, fall back to use ffmpeg when librosa.load fails.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions