Skip to content

fix: skip translation when configured language matches target (fixes #9)#10

Merged
SeoFood merged 1 commit intomainfrom
issue-9
Apr 5, 2026
Merged

fix: skip translation when configured language matches target (fixes #9)#10
SeoFood merged 1 commit intomainfrom
issue-9

Conversation

@SeoFood
Copy link
Copy Markdown
Contributor

@SeoFood SeoFood commented Apr 3, 2026

Summary

When Whisper hallucinates a different language (e.g. detecting English while the user speaks Italian), the translation step would incorrectly translate already-correct text. This adds a check so that when the user's explicitly configured source language matches the translation target, translation is skipped regardless of Whisper's detected language. Auto-detect behavior is preserved since the configured language is null in that case.

Test Plan

  • New test: ProcessAsync_Translation_SkippedWhenEffectiveLanguageMatchesTarget verifies the hallucination scenario
  • All 14 existing pipeline tests still pass

When Whisper hallucinates a different language, the translation step
would incorrectly translate already-correct text. Now also checks
the user's configured source language against the target.
@SeoFood SeoFood merged commit 837b3f5 into main Apr 5, 2026
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