Skip to content

Add more wav-compatiable MIME types and enhance MIME type normalization#22744

Draft
guangchenli wants to merge 1 commit intoggml-org:masterfrom
guangchenli:frontend-audio-type-fix
Draft

Add more wav-compatiable MIME types and enhance MIME type normalization#22744
guangchenli wants to merge 1 commit intoggml-org:masterfrom
guangchenli:frontend-audio-type-fix

Conversation

@guangchenli
Copy link
Copy Markdown

Description

This PR addresses issue in #21850 by adding more MIME types in the check logic.

Changes

Added support to

  • audio/wave
  • audio/wav
  • audio/x-wav
  • audio/x-pn-wav

These MIME types are common in medias generated by older audio recording and synthesis software and are binary compatiable to the standard WAV format. Current webui logic will ignore these types silently, resulting to the bug described in #21850 .

It also added a short MIME normalization logic to suppress problems caused by irregular MIME string.

How to Test

Upload a test audio file with MIME type audio/x-wav using the webui with a model supporting audio modality:

image

Check if it can handle the audio file correctly:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant