[GH-ISSUE #2617] [BUG]: OpenAiWhisper always leads a transcribing failure #1698

Closed
opened 2026-02-22 18:26:07 -05:00 by yindo · 2 comments
Owner

Originally created by @fiyen on GitHub (Nov 11, 2024).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2617

How are you running AnythingLLM?

Local development

What happened?

Once a Transcription API is set to OpenAiWhisper, transcription result is failure whenever I upload a .mp3 file. I find that the code in line 36 of OpenAiWhisper.js in collector directory is return a result like: content: response. I have referred to the docs in openai.com, the example shows that the text content should extract by using response.text. So I change the code to content: response.text, and my question is solved.

Are there known steps to reproduce?

Just change the transcription API to open whisper and upload a .mp3 file in your workshop.

Originally created by @fiyen on GitHub (Nov 11, 2024). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/2617 ### How are you running AnythingLLM? Local development ### What happened? Once a Transcription API is set to OpenAiWhisper, transcription result is failure whenever I upload a .mp3 file. I find that the code in line 36 of `OpenAiWhisper.js` in collector directory is return a result like: content: response. I have referred to the docs in openai.com, the example shows that the text content should extract by using `response.text`. So I change the code to `content: response.text`, and my question is solved. ### Are there known steps to reproduce? Just change the transcription API to open whisper and upload a .mp3 file in your workshop.
yindo added the possible bug label 2026-02-22 18:26:07 -05:00
yindo closed this issue 2026-02-22 18:26:07 -05:00
Author
Owner

@timothycarambat commented on GitHub (Nov 11, 2024):

I can confirm that PR #2618 actually introduces the bug that the associated PR is alleviating. We specifically return text and not JSON - so the response body is the text
https://github.com/Mintplex-Labs/anything-llm/blob/e41a9beaaeb30d1b0f4feacdb5ccd7647b71eb7c/collector/utils/WhisperProviders/OpenAiWhisper.js#L25

The only ways this behavior could be occurring is that you are on a modified version of AnythingLLM or are using a proxy or host override that instead maps to an OpenAI compatible service that is actually not fully 1:1 and always returns type json

@timothycarambat commented on GitHub (Nov 11, 2024): I can confirm that PR #2618 actually introduces the bug that the associated PR is alleviating. We specifically return `text` and not JSON - so the response body _is the text_ https://github.com/Mintplex-Labs/anything-llm/blob/e41a9beaaeb30d1b0f4feacdb5ccd7647b71eb7c/collector/utils/WhisperProviders/OpenAiWhisper.js#L25 The only ways this behavior could be occurring is that you are on a modified version of AnythingLLM or are using a proxy or `host` override that instead maps to an OpenAI compatible service that is actually not fully 1:1 and always returns type `json`
Author
Owner

@timothycarambat commented on GitHub (Nov 11, 2024):

@fiyen We just merged in a slight modification of this PR which should support your use case as well as not break compatibility with the current implementation of OpenAI in AnythingLLM #2621

@timothycarambat commented on GitHub (Nov 11, 2024): @fiyen We just merged in a slight modification of this PR which should support your use case as well as not break compatibility with the current implementation of OpenAI in AnythingLLM #2621
yindo changed title from [BUG]: OpenAiWhisper always leads a transcribing failure to [GH-ISSUE #2617] [BUG]: OpenAiWhisper always leads a transcribing failure 2026-06-05 14:42:11 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#1698