mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-17 14:55:23 +00:00
refac: audio transcribe supported filetype
This commit is contained in:
parent
27da31dc83
commit
7b36466c1c
1 changed files with 7 additions and 1 deletions
|
|
@ -789,7 +789,13 @@ def transcription(
|
||||||
):
|
):
|
||||||
log.info(f"file.content_type: {file.content_type}")
|
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):
|
if not file.content_type.startswith(supported_filetypes):
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue