Skip to content

Comments

refactor multilingual option#1148

Merged
MahmoudAshraf97 merged 5 commits intoSYSTRAN:masterfrom
MahmoudAshraf97:multilingual
Nov 19, 2024
Merged

refactor multilingual option#1148
MahmoudAshraf97 merged 5 commits intoSYSTRAN:masterfrom
MahmoudAshraf97:multilingual

Conversation

@MahmoudAshraf97
Copy link
Collaborator

@MahmoudAshraf97 MahmoudAshraf97 commented Nov 16, 2024

Summary:

  • Added test for multilingual option with english-german audio
  • I've already removed output_language argument as it is redundant, you can get the same functionality with task="translate" and I've verified this with several model sizes
  • use the correct encoder_output for language detection
  • enabled the same functionality for batched inference

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.language is always in prompt, which might cause a ValueError if not found. Add a check to ensure tokenizer.language is in prompt before getting its index.
language_token_index = prompt.index(tokenizer.language)

@MahmoudAshraf97 MahmoudAshraf97 changed the title RFC: multilingual option refactor multilingual option Nov 19, 2024
@MahmoudAshraf97 MahmoudAshraf97 marked this pull request as ready for review November 19, 2024 21:13
@MahmoudAshraf97 MahmoudAshraf97 merged commit bcd8ce0 into SYSTRAN:master Nov 19, 2024
@MahmoudAshraf97 MahmoudAshraf97 deleted the multilingual branch November 19, 2024 21:51
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant