Transcript Provider Flow
Goal: keep provider entrypoints thin; keep provider policy explicit.
#Provider entrypoints
packages/core/src/content/transcript/providers/youtube.tspackages/core/src/content/transcript/providers/youtube/native-media.tspackages/core/src/content/transcript/providers/podcast.tspackages/core/src/content/transcript/providers/generic.tspackages/core/src/content/transcript/providers/generic-embedded.tspackages/core/src/content/transcript/providers/generic-direct-media.tspackages/core/src/content/transcript/providers/generic-twitter.ts
YouTube orchestration only. Web captions first. yt-dlp, Android VR direct media, then Apify fallback.
Android VR direct-audio resolution + shared media transcription only.
Podcast orchestration only. Feed/Spotify/Apple/enclosure/yt-dlp chain.
Thin orchestration only. Embedded tracks first. Direct-media / Loom / X media fallback next.
Embedded media detection + caption-track parsing only.
Direct-media and Loom yt-dlp/transcription fallback only.
X/Twitter cookies + yt-dlp orchestration only.
#Shared policy
- YouTube transcript and web-player requests share header construction in
youtube/api.ts. Android-player headers remain separate, and the identity token remains web-player-only. podcast/feed-flow.tsowns RSS transcript lookup, timestamp selection, and result shaping for direct feeds, Apple, and Spotify. Each source retains feed fetching, fallback decisions, and failure metadata; Apple's iTunes path still records the feed attempt before fetching.podcast/media.tsshares download progress, transcription options, and completion across in-memory and temporary-file sources. Size limits and duration probing remain source-specific; temporary files are removed after success or failure.content/link-preview/content/page-media.tstranscription-capability.tsresolveTranscriptProviderCapabilitiescanTranscribecanRunYtDlp- missing-provider note/result shaping
transcription-start.ts- Local Whisper readiness checks for a usable model before starting the executable probe. FFmpeg segmentation and transcoding share process completion/error handling; MP3/WAV and lenient recovery retain their own arguments. OpenAI plain and diarized transcripts share HTTP submission but keep separate payload validation.
HTML and Firecrawl share media detection, transcript resolution, source-metric refresh, and embedded article/transcript composition. Each page builder retains its metadata and Markdown policy; metric deadlines still start at builder entry.
One place for:
Runtime availability only. Local whisper, ONNX, cloud presence, display hints.
#Remote fallback
packages/core/src/transcription/whisper/cloud-providers.tspackages/core/src/transcription/whisper/remote-provider-attempts.tspackages/core/src/transcription/whisper/remote.tspackages/core/src/transcription/whisper/diarization.ts- YouTube yt-dlp media:
src/speaker-identification/
Provider order + labels + model-id chain.
Per-provider byte/file attempts.
Order loop only. Fallback notes. OpenAI chunk/delegate policy.
Explicit speaker-label requests only. Extracts local video audio once before provider attempts. ElevenLabs Scribe v2 first in auto mode, then OpenAI gpt-4o-transcribe-diarize.
Diarization-only downloads audio. Combined slides + diarization downloads separate audio/video streams once and shares the video cache entry with slide extraction.
Optional post-processing for generic diarization labels. Timestamp anchors first, exact-transcript remembered mappings second, OpenAI GPT-5.5 context inference last. Named extracts have identity-aware cache keys; raw transcript cache entries remain provider-generic.
#Current order
- Groq first when
GROQ_API_KEYis set - local ONNX / whisper.cpp before the remaining cloud providers
- remaining cloud bytes/file order:
- AssemblyAI
- Gemini
- OpenAI
- FAL
- Deepgram
- speaker diarization (
--diarize): - ElevenLabs
- OpenAI
#Rules
- keep entrypoints thin
- add provider notes in shared helpers, not scattered strings
- prefer pure parser helpers before touching orchestration
- if adding a new provider:
- register cloud metadata
- add remote attempt handler
- widen shared capability helper
- add focused provider tests before live tests