Add optional Yandex voice-over translation (EN to RU) for player#5817
Open
mikhkz wants to merge 1 commit into
Open
Add optional Yandex voice-over translation (EN to RU) for player#5817mikhkz wants to merge 1 commit into
mikhkz wants to merge 1 commit into
Conversation
Based on voice-over-translation, vot-cli, and vot.js (see CREDITS.md).
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
Adds an optional Yandex Voice-Over Translation (VOT) feature for Android TV: translate the current YouTube video's audio to Russian while watching (similar to the browser extension workflow).
ExoPlayerfor the translated MP3 stream, synced with main playback (play/pause/seek, speed)ru (dubbed-auto))VotAudioTrackHelperparses YouTube audio labels (en-US (original), legacy bare[en], etc.)AUDIO_REQUESTEDvia the same fallback as vot.js (fail-audio-js+ empty audio upload)Prior work (this port is based on)
Implementation ideas and API behavior are derived from the community Voice Over Translation projects:
AUDIO_REQUESTED/fail-audio-jsworkaroundThank you to the authors and contributors of those repositories. This PR adds a TV-native integration for SmartTube; it is not affiliated with Yandex or the extension authors.
Motivation
Many SmartTube users watch English content on TV without a desktop browser. A built-in VOT toggle improves accessibility and matches a popular browser extension use case.
Implementation notes
common/.../vot/- protobuf client forapi.browser.yandex.ru(OkHttp), ported from vot-cli / voice-over-translation ideasVoiceTranslateController- UI state, auto-translate, track selection,VotClient+TranslationAudioPlayerActionHelpers.getBitmapDrawable()- vector drawable support inTwoStateAction(fixesClassCastExceptionfor overlay actions)How to test
assembleStstableDebug[en]audio tracks)Limitations / risks
AUDIO_REQUESTEDuses fallback, not full YouTube audio upload)Checklist
assembleStstableDebugvaluesandvalues-ru