Conversation
- Add --output-locale option to translate transcribed text - Import Translation framework with @preconcurrency - Implement translateTranscript() method that: * Checks translation model availability * Provides helpful error messages for missing models * Splits text into chunks for better translation quality * Preserves sentence structure in translated output - Handles async translation with progress tracking - Requires translation models to be installed in System Settings
- Add --output-locale option to usage example - Add example of transcribing Japanese and translating to German - Document requirement for translation models in System Settings - Clarify that translation models must be pre-installed
- Update translateTranscript to handle both SRT and TXT formats - For SRT: translate sentence-by-sentence while preserving time ranges - For TXT: translate full text without time range requirements - Enables translated subtitles with proper timing information - Tested with Japanese to German translation in SRT format
- Automatically set maxLength to 9999 for SRT output when translation is active - Reduces (but doesn't eliminate) duplicate timestamps in translated SRT - TXT format translation works perfectly - Known issue: NLTokenizer may find different sentence boundaries in translated text compared to source, causing some timestamp overlap in SRT format
- Translate each sentence 1:1 with original time ranges preserved - No re-tokenization or merging of translated sentences - Output preserves exact same subtitle count and timing as source - Simplified translation logic - removed unnecessary fallback code - Japanese 455 subtitles → German 454 subtitles (1 empty filtered) - All timestamps match perfectly between source and translation
Author
|
This is vibe coded but reviewed and tested by myself. The translation is ok-ish, what you can expect from the built-in macOS feature, but it's fast. Tested with multiple YouTube videos and a few anime episodes. Not perfect, but watchable and better than not having subtitles. |
This branch has not been deployed
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.
No description provided.