Merged
Conversation
- 新增 src/transcribe.ts:Transcriber 介面(策略模式)+ 工廠函式 - NoopTranscriber(預設:不轉錄) - isVideoPost() 判斷影片貼文 - transcribeVideoPosts() 批次處理 - UnifiedPost 新增 transcriptText 欄位 - index.ts:抓取後自動對影片貼文觸發轉錄,分析時包含轉錄文字 - facebook.ts:mediaUrl 優先取 video_url/playable_url(影片實際 URL) 具體轉錄服務實作待定,只需新增 Transcriber 實作並註冊到工廠。 透過 TRANSCRIBER 環境變數選擇轉錄器(預設 noop)。 Closes #4 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 新增 GroqTranscriber:直接傳影片 URL 給 Groq Whisper API,不需下載到本地 - 使用 whisper-large-v3 模型,language=zh 優化中文辨識 - 透過 TRANSCRIBER=groq + GROQ_API_KEY 環境變數啟用 - README 補充 .env 設定與費用估算 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Facebook 影片 URL 實際是頁面連結(reel/watch),Groq API 無法直接存取。 改為:偵測 Facebook URL → yt-dlp 下載音訊 → 傳檔案給 Groq → 清理暫存。 非 Facebook 的直連 URL 仍走 url 參數快速路徑。 同時修正 facebook.ts mediaUrl 取值:影片貼文優先取 media.url(reel 連結), 而非 thumbnail(縮圖 jpg),確保轉錄器拿到正確的來源。 已驗證:3 個影片貼文全部成功轉錄(28s/19s/49s)。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
GroqTranscriber實作,接入 Groq Whisper API(whisper-large-v3)language=zh優化中文語音辨識準確度TRANSCRIBER=groq+GROQ_API_KEY=gsk_...Closes #4
架構
Test plan
TRANSCRIBER=groq+GROQ_API_KEY,執行npm run dev[影片轉錄]輸出TRANSCRIBER時行為不變(noop)🤖 Generated with Claude Code