mirror of
https://github.com/open-webui/open-webui
synced 2025-06-26 18:26:48 +00:00
refac: audio transcribe supported filetype
This commit is contained in:
parent
27da31dc83
commit
7b36466c1c
@ -789,7 +789,13 @@ def transcription(
|
||||
):
|
||||
log.info(f"file.content_type: {file.content_type}")
|
||||
|
||||
supported_filetypes = ("audio/mpeg", "audio/wav", "audio/ogg", "audio/x-m4a")
|
||||
supported_filetypes = (
|
||||
"audio/mpeg",
|
||||
"audio/wav",
|
||||
"audio/ogg",
|
||||
"audio/x-m4a",
|
||||
"audio/webm",
|
||||
)
|
||||
|
||||
if not file.content_type.startswith(supported_filetypes):
|
||||
raise HTTPException(
|
||||
|
Loading…
Reference in New Issue
Block a user