fix(elevenlabs_asr): __main__ block passes a language_code kwarg that does not exist - #595
Open
Anai-Guo wants to merge 1 commit into
Open
fix(elevenlabs_asr): __main__ block passes a language_code kwarg that does not exist#595Anai-Guo wants to merge 1 commit into
Anai-Guo wants to merge 1 commit into
Conversation
The __main__ block called transcribe_audio_elevenlabs with a language_code keyword that is not a parameter, and omitted the required vocal_audio_path. Match the real caller in core/_2_asr.py. The language prompt is dropped because the request body reads whisper.language from config, so the entered value was never used.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Running
core/asr_backend/elevenlabs_asr.pydirectly fails immediately — its__main__block calls the function with arguments that do not match its signature:
Two independent errors:
language_codeis not a parameter →TypeError: transcribe_audio_elevenlabs() got an unexpected keyword argument 'language_code'vocal_audio_pathis required and never passed →missing a required argumentThere is also a third, quieter problem: the script prompts the user for a language that
the function never consults. The request body sources it from config instead:
So the prompt collects a value that has no effect on the result.
The intended call shape
The real caller in
core/_2_asr.py:41passes all four positionally:The
__main__block is the only call site that disagrees, which is why this has goneunnoticed — the normal pipeline path works fine.
Fix
Mirror the real caller and drop the prompt that had no effect:
Passing
file_pathfor bothraw_audio_pathandvocal_audio_pathmatches thestandalone use case, where there is no separated vocal track — only
vocal_audio_pathis actually loaded, and
raw_audio_pathis unused in the body.Only the
__main__block changes;transcribe_audio_elevenlabsand the pipeline pathare untouched.
🤖 Generated with Claude Code