Yt::TranscriptExtractor
Service to extract transcripts from YouTube videos using yt-dlp and Whisper fallback.
Constants
DEFAULT_LANG = "es,en"
DEFAULT_WHISPER_MODEL = "base"
Constructors
Instance methods
Strips HTML/VTT style tags, e.g. <c.colorE5E5E5> or <00:00:01.000> and unescapes HTML entities
extract(video_id : String, lang : String = DEFAULT_LANG, allow_audio_fallback : Bool = true, whisper_model : String = DEFAULT_WHISPER_MODEL) : Models::Transcript
Extracts transcript for the given video_id.
video_id - 11-character YouTube video ID lang - Preferred language codes (comma-separated, e.g. "es,en") allow_audio_fallback - Whether to download audio and run local Whisper if no captions exist whisper_model - Whisper model to use if audio fallback is triggered (default: "base")
Parses YouTube json3 subtitle format
Converts HH:MM:SS.mmm or MM:SS.mmm to seconds (Float64)