Translate and reformat YouTube video transcripts into polished scripts using OpenAI GPT-4. Supports any language pair and multiple storytelling frameworks.
- Takes a raw YouTube transcript (plain text file)
- Splits it into chunks to handle token limits
- Translates from source to target language via GPT-4 Turbo
- Reformats the content using a storytelling framework
- Outputs a polished, ready-to-use video script
| Framework | Description |
|---|---|
| Hero's Journey | Starts with a problem/crisis, analyzes the situation, ends with a hopeful vision |
| Problem-Solution-Future | Problem first, then analysis, then positive outlook |
| Narrative Circle | Starts and ends with the same idea/metaphor, but with a new perspective |
| Contrast & Compare | Multiple perspectives side by side for balanced analysis |
- Python 3.8+
- OpenAI API key (platform.openai.com)
pip install -r requirements.txtpython translate.py --input transcript.txtThe script will prompt you to select a language, framework, and style.
python translate.py \
--input transcript.txt \
--output script.txt \
--source-lang English \
--target-lang Spanish \
--framework "Problem-Solution-Future" \
--style "dynamic and engaging"export OPENAI_API_KEY=sk-...
python translate.py --input transcript.txt| Argument | Default | Description |
|---|---|---|
--input |
transcript.txt |
Input transcript file |
--output |
script_output.txt |
Output script file |
--source-lang |
English |
Source language |
--target-lang |
English |
Target language (same as source = reformat only) |
--framework |
Hero's Journey |
Storytelling framework |
--style |
(empty) | Additional style instructions |
# Translate an English tech review into a German script
python translate.py \
--input tech-review-transcript.txt \
--output german-script.txt \
--source-lang English \
--target-lang German \
--framework "Hero's Journey" \
--style "with technical terminology, enthusiastic tone"MIT