Repository navigation
feat(youtube): opt-in audio fallback for videos without a transcript - #109
Open
johnisanerd wants to merge 2 commits into
Open
johnisanerd wants to merge 2 commits into
johnisanerd wants to merge 2 commits into
Conversation
youtube_audio_fallback="apify" (CCORE_YOUTUBE_AUDIO_FALLBACK) downloads the audio with the johnvc/youtube-download-api Apify Actor when no transcript can be fetched, and transcribes it with transcribe_audio. Default "off". Refs lfnovo#61
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 8 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
List youtube_audio_fallback in the CLI key help and docs/cli.md, note NetworkError next to ExternalServiceError in the changelog and the extract_youtube docstring, say an audio fallback can make more than one STT call, and pin the default-off test to youtube_audio_fallback="off".
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.
Refs #61.
When neither youtube-transcript-api nor pytubefix gets a transcript (no captions, or YouTube blocks every request), extraction raises. This adds
youtube_audio_fallback(CCORE_YOUTUBE_AUDIO_FALLBACK), off by default: set toapifywithAPIFY_API_TOKEN, it downloads the audio with thejohnvc/youtube-download-apiActor and runs it through the existingtranscribe_audio, so the host needs neither yt-dlp nor Deno. A missing token raisesConfigurationErrorand a failed download raisesExternalServiceError. Unit tests cover the off, on, no-token and failed-run cases, and I ran the helper against live Actor output forpBy1zgt0XPc.