Compare commits

...

1 Commits

Author SHA1 Message Date
lukehemmin a5e6d56568 docs: add Colab notebook for full-talk transcription (notebooks/colab_full_transcribe.ipynb)
GPU(T4) 셀: ffmpeg+uv → 익명 clone → uv sync(engine+gpu) → detect →
오디오 업로드 → large-v3-turbo 풀 전사 → transcript.txt 다운로드.
(Colab은 사내 게이트 미도달이라 전사 전용; 보정은 온프렘.)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-09 07:33:54 +09:00
+130
View File
@@ -0,0 +1,130 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# luke_scribe — Colab 풀 강연 전사\n",
"\n",
"GPU(T4)에서 풀 강연을 **수 분**에 전사합니다.\n",
"\n",
"**먼저:** 런타임 → 런타임 유형 변경 → 하드웨어 가속기 **GPU** 선택.\n",
"\n",
"> ⚠️ Colab은 외부라 **사내 LLM 게이트(192.168.0.123)에 못 닿습니다** → 보정(`--correct`) 불가, **전사만**. 보정까지는 사내망 GPU에서 (repo `COLAB.md` B절).\n"
]
},
{
"cell_type": "code",
"metadata": {},
"execution_count": null,
"outputs": [],
"source": [
"# 0) GPU 확인 (없으면 런타임 유형을 GPU로)\n",
"!nvidia-smi -L || echo \"GPU 없음 → 런타임 유형을 GPU로 바꾸세요\"\n"
]
},
{
"cell_type": "code",
"metadata": {},
"execution_count": null,
"outputs": [],
"source": [
"# 1) 시스템 의존성 + uv\n",
"!apt-get -qq update && apt-get -qq install -y ffmpeg\n",
"!curl -LsSf https://astral.sh/uv/install.sh | sh\n",
"import os\n",
"os.environ['PATH'] = '/root/.local/bin:' + os.environ['PATH']\n"
]
},
{
"cell_type": "code",
"metadata": {},
"execution_count": null,
"outputs": [],
"source": [
"# 2) 코드 가져오기 (저장소 익명 read 허용)\n",
"!git clone -b feat/p1-core https://git.lukehemmin.com/lukehemmin/luke_scribe.git\n",
"%cd luke_scribe\n"
]
},
{
"cell_type": "code",
"metadata": {},
"execution_count": null,
"outputs": [],
"source": [
"# 3) 의존성 (엔진 + GPU CUDA 런타임) — 수 분 소요\n",
"!uv sync --extra engine --extra gpu\n"
]
},
{
"cell_type": "code",
"metadata": {},
"execution_count": null,
"outputs": [],
"source": [
"# 4) 하드웨어 등급 확인 (T3 = turbo+large-v3 동시상주)\n",
"!uv run luke-scribe detect\n"
]
},
{
"cell_type": "code",
"metadata": {},
"execution_count": null,
"outputs": [],
"source": [
"# 5) 강연 오디오 업로드 (m4a/mp3/wav/mp4 …)\n",
"from google.colab import files\n",
"AUDIO = list(files.upload().keys())[0]\n",
"print('업로드:', AUDIO)\n"
]
},
{
"cell_type": "code",
"metadata": {},
"execution_count": null,
"outputs": [],
"source": [
"# 6) 풀 전사 (large-v3-turbo; 더 정확히는 --model large-v3)\n",
"!uv run luke-scribe transcribe \"$AUDIO\" --model large-v3-turbo --language ko --timestamps | tee transcript.txt\n"
]
},
{
"cell_type": "code",
"metadata": {},
"execution_count": null,
"outputs": [],
"source": [
"# 7) 전사문 내려받기\n",
"from google.colab import files\n",
"files.download('transcript.txt')\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 참고\n",
"- **모델**: `large-v3-turbo`(빠름) ↔ `large-v3`(정확). `detect`가 T0(CPU)면 약 GPU(느림).\n",
"- **보정(음차→영문)**: Colab 불가(게이트 미도달). 사내망 GPU에서 `--correct` + `SCRIBE_LLM_*` (`COLAB.md` B절).\n",
"- **속도**: T4 turbo ≈ 실시간 0.1~0.3× → 37분 강연 수 분.\n"
]
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"provenance": [],
"gpuType": "T4"
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}