How whotto/video_note_generator works
• Downloading the video
• Extracting audio from the video using FFmpeg
• Transcribing the audio via Whisper
• Running an AI-based long text reorganization (using OpenRouter) to optimize content in a targeted Xiaohongshu style
• Generating output files in three different formats (raw transcription, organized note, and a fully optimized Xiaohongshu note with title, content, tags, and images retrieved from Unsplash)
And Label Core Components
a. Input Handler:
– Accepts different forms of input (URL, list file, Markdown).
b. Video Download & Processing Module:
– Uses FFmpeg to download the video and extract audio.
c. Transcription Module:
– Integrates Whisper for converting audio to text.
d. AI Content Optimization Module:
– Uses an AI service (OpenRouter) to reorganize and optimize the transcribed text into a long-form note.
e. Generation Module:
– Handles creation of the three output files: original transcription, organized note, and the tailored Xiaohongshu note (with title, optimized text, tags, and image references via Unsplash).
f. Environment & Configuration Manager:
– Uses the .env file to load API keys and other configuration parameters.
g. Utility Scripts:
– A script for checking the system environment (check_environment.py).
Component Interactions and Data Flow
c. Next, the extracted audio flows to the “Transcription Module” (Whisper integration), converting audio into raw text.
d. The raw text then flows into the “AI Content Optimization Module” that applies longer text organization and Xiaohongshu style rules.
e. From there, the transformation pipeline converges in the “Note Generation Module”, which produces three separate output files.
f. The “Environment & Configuration Manager” supplies necessary API keys (for OpenRouter and Unsplash) and parameters (like tokens, temperature) to relevant modules.
Architectural Patterns or Design Principles
– There is a clear separation of concerns where each module is responsible for one stage of the processing pipeline.
– Consider indicating modular interactions which could allow for independent updates to video downloading, transcription, or AI optimization without overall system disruption.
Technologies and Frameworks
– Note the use of Python for scripting and orchestration.
– List external utilities/services: FFmpeg for media processing, Whisper for transcription, OpenRouter for AI content processing, and Unsplash for image retrieval.