-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Which version of integration_openai are you using?
3.5.0
Which version of Nextcloud are you using?
30.0.5
Which browser are you using? In case you are using the phone App, specify the Android or iOS version and device please.
N/A
Describe the Bug
When an audio file is submitted for transcription, OpenAiAPIService does not check the contentlength before submitting the API request. If the submitted audio file is too long for the API limits, it throws an API request error like this:
A TaskProcessing core:audio2text task with id 8 failed with the following message: OpenAI's Whisper transcription failed with: API request error: 413: Maximum content size limit (26214400) exceeded (26384610 bytes read)
Expected Behavior
The integration should detect the large content size and chunk the audio file for multi-part processing, or recompress with ffmpeg and the voice codec, etc.
At the very least it should throw an error or visible user message when the file is selected for processing and advise the user remediate it.
To Reproduce
Try to transcribe an audio file larger than 25MB with OpenAI API. I'm not sure if the maximum content size is adjustable in localAI but you could test it there too if you know the value.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request