refactor multilingual option#1148
Merged
MahmoudAshraf97 merged 5 commits intoSYSTRAN:masterfrom Nov 19, 2024
Merged
Conversation
8002d62 to
f4fd527
Compare
There was a problem hiding this comment.
Copilot reviewed 3 out of 3 changed files in this pull request and generated no suggestions.
Comments skipped due to low confidence (1)
faster_whisper/transcribe.py:219
- This line assumes
tokenizer.languageis always inprompt, which might cause aValueErrorif not found. Add a check to ensuretokenizer.languageis inpromptbefore getting its index.
language_token_index = prompt.index(tokenizer.language)
multilingual optionmultilingual option
Equipo45
pushed a commit
to Equipo45/faster-whisper
that referenced
this pull request
Dec 4, 2024
* Added test for `multilingual` option with english-german audio * removed `output_language` argument as it is redundant, you can get the same functionality with `task="translate"` * use the correct `encoder_output` for language detection in sequential transcription * enabled `multilingual` functionality for batched inference
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.
Summary:
multilingualoption with english-german audiooutput_languageargument as it is redundant, you can get the same functionality withtask="translate"and I've verified this with several model sizesencoder_outputfor language detection