Spaces:
Sleeping
Sleeping
|
Download README.md from heebin/YoutubeScript: direct link, hf CLI and curl.
- Browser
- Download file 3.36 kB
-
https://huggingface.co/spaces/heebin/YoutubeScript/resolve/main/README.md
- Command line
-
hf download hf://spaces/heebin/YoutubeScript/README.md
-
curl -L -o README.md https://huggingface.co/spaces/heebin/YoutubeScript/resolve/main/README.md
3.36 kB
metadata
title: YouTube Script Extractor
emoji: ๐ฌ
colorFrom: red
colorTo: yellow
sdk: docker
app_port: 7860
๐ฌ YouTube Script Extractor
YouTube ์์์์ ์คํฌ๋ฆฝํธ๋ฅผ ์ถ์ถํ๊ณ , AI๋ก ๊น๋ํ๊ฒ ์ ๋ฆฌํ๋ ๋๊ตฌ์ ๋๋ค.
โจ ์ฃผ์ ๊ธฐ๋ฅ
- ์๋ ์คํฌ๋ฆฝํธ ์ถ์ถ โ YouTube URL๋ง ์ ๋ ฅํ๋ฉด ์์ฑ์ ํ ์คํธ๋ก ๋ณํ
- AI ๋งํฌ๋ค์ด ์ ๋ฆฌ โ LLM์ด ์คํฌ๋ฆฝํธ๋ฅผ ๊ตฌ์กฐํ๋ ๋งํฌ๋ค์ด์ผ๋ก ์ ๋ฆฌ
- ๋ค๊ตญ์ด ๋ฒ์ญ โ 14๊ฐ ์ธ์ด ์ง์ (ํ๊ตญ์ด, ์์ด, ์ผ๋ณธ์ด ๋ฑ)
- ํคํ๋ ์ ๋ถ์ (CV) โ ์์์ ํต์ฌ ์ฅ๋ฉด์ ์ถ์ถํ๊ณ Vision AI๋ก ๋ถ์
- Smart Mix โ ํ์ดํ๋ผ์ธ ๋จ๊ณ๋ณ๋ก ๋ค๋ฅธ LLM์ ์ง์ ๊ฐ๋ฅ
- ์น UI + CLI โ ๋ธ๋ผ์ฐ์ ๊ธฐ๋ฐ UI์ ์ปค๋งจ๋๋ผ์ธ ๋ชจ๋ ์ง์
๐ค ์ง์ LLM
| ๋ชจ๋ธ | ๊ฐ๊ฒฉ | Vision | ๋น๊ณ |
|---|---|---|---|
| Ollama (๋ก์ปฌ) | ๋ฌด๋ฃ | โ | ์ธํฐ๋ท ๋ถํ์ |
| Gemini 2.5 Flash-Lite | $0.10/1Mํ ํฐ | โ | โญ ์ต์ ๊ฐ |
| Gemini 3.1 Flash-Lite | $0.25/1Mํ ํฐ | โ | ์ต์ ๋ชจ๋ธ |
| GPT-4o-mini | $0.15/1Mํ ํฐ | โ | OpenAI |
| Claude Sonnet 4.6 | $3/1Mํ ํฐ | โ | ๊ณ ํ์ง |
| Claude Opus 4.6 | $5/1Mํ ํฐ | โ | ์ต๊ณ ํ์ง |
๐ ๋น ๋ฅธ ์์
1. ์ค์น
git clone https://huggingface.co/spaces/YOUR_USERNAME/youtube-script-extractor
cd youtube-script-extractor
# ffmpeg ์ค์น (macOS)
brew install ffmpeg
# Python ์์กด์ฑ ์ค์น
pip install -r requirements.txt
2. API ํค ์ค์
cp .env.example .env
# .env ํ์ผ์ ์ด์ด ์ฌ์ฉํ LLM์ API ํค๋ฅผ ์
๋ ฅํ์ธ์
3. ์คํ
# ์น UI (์ถ์ฒ)
chmod +x run
./run
# ๋๋ ์ง์ ์คํ
python3 web.py
๋ธ๋ผ์ฐ์ ์์ http://localhost:8000 ์ ์
CLI ๋ชจ๋
./run "https://www.youtube.com/watch?v=VIDEO_ID"
./run "https://www.youtube.com/watch?v=VIDEO_ID" --mode local --format srt
โ๏ธ ์ค์
.env ํ์ผ์์ ์ค์ ํฉ๋๋ค:
# ํ์: Whisper API์ฉ
OPENAI_API_KEY=sk-proj-...
# ์ ํ: ์ฌ์ฉํ๋ LLM๋ง ์ค์
GOOGLE_API_KEY=... # Gemini
ANTHROPIC_API_KEY=... # Claude
# ๊ธฐ๋ณธ ์ค์
DEFAULT_MODE=api # api ๋๋ local
DEFAULT_MODEL=base # Whisper ๋ชจ๋ธ (tiny/base/small/medium/large)
PORT=8000
๐ ํ๋ก์ ํธ ๊ตฌ์กฐ
โโโ run # ์คํ ์คํฌ๋ฆฝํธ (์ค์น + ์คํ)
โโโ web.py # FastAPI ์น ์๋ฒ
โโโ cli.py # CLI ์ธํฐํ์ด์ค
โโโ transcriber.py # ์์ฑ ์ถ์ถ + STT + ํคํ๋ ์ ์ถ์ถ
โโโ formatter.py # LLM ํธ์ถ + ๋งํฌ๋ค์ด ์ ๋ฆฌ + ๋ฒ์ญ
โโโ templates/
โ โโโ index.html # ์น UI
โโโ requirements.txt # Python ์์กด์ฑ
โโโ .env.example # ํ๊ฒฝ ๋ณ์ ํ
ํ๋ฆฟ
โโโ output/ # ์ถ์ถ ๊ฒฐ๊ณผ๋ฌผ (git ์ ์ธ)
๐ง Smart Mix (๋จ๊ณ๋ณ LLM ์ ํ)
์น UI์ โ ๋ฒํผ์ผ๋ก ํ์ดํ๋ผ์ธ ๋จ๊ณ๋ณ LLM์ ์ค์ ํ ์ ์์ต๋๋ค:
- MD ์ ๋ฆฌ โ ์คํฌ๋ฆฝํธ๋ฅผ ๋งํฌ๋ค์ด์ผ๋ก ๊ตฌ์กฐํ (์ ๋ ดํ ๋ชจ๋ธ OK)
- ๋ฒ์ญ โ ๋ค๊ตญ์ด ๋ฒ์ญ (์ ๋ ดํ ๋ชจ๋ธ OK)
- ํคํ๋ ์ ๋ถ์ โ Vision AI๋ก ํ๋ฉด ๋ถ์ (Vision ์ง์ ๋ชจ๋ธ ํ์)
๐ ์๊ตฌ์ฌํญ
- Python 3.9+
- ffmpeg
- API ํค (์ฌ์ฉํ๋ ค๋ LLM์ ๋ฐ๋ผ)
๐ License
MIT