Skip to content

Comments

Deduplication of language detection functions#1146

Merged
MahmoudAshraf97 merged 5 commits intoSYSTRAN:masterfrom
MahmoudAshraf97:language_detection_refactor
Nov 16, 2024
Merged

Deduplication of language detection functions#1146
MahmoudAshraf97 merged 5 commits intoSYSTRAN:masterfrom
MahmoudAshraf97:language_detection_refactor

Conversation

@MahmoudAshraf97
Copy link
Collaborator

@MahmoudAshraf97 MahmoudAshraf97 commented Nov 15, 2024

This PR aims to unify language detection in both WhisperModel and BatchedInferencePipeline

Summary:

  • Supported new options for batched transcriptions:
    • language_detection_threshold
    • language_detection_segments
  • Updated WhisperModel.detect_language function to include the improved language detection from Improve language detection #732 and added docstrings, it's now used inside transcribe function.
  • Removed the following functions as they are no longer needed:
    • WhisperModel.detect_language_multi_segment and its test
    • BatchedInferencePipeline.get_language_and_tokenizer
  • Added tests for empty audios

@MahmoudAshraf97 MahmoudAshraf97 marked this pull request as draft November 15, 2024 17:12
@MahmoudAshraf97 MahmoudAshraf97 marked this pull request as ready for review November 15, 2024 23:49
@MahmoudAshraf97 MahmoudAshraf97 merged commit a6f8fba into SYSTRAN:master Nov 16, 2024
@MahmoudAshraf97 MahmoudAshraf97 deleted the language_detection_refactor branch November 16, 2024 12:45
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