- docs/dev/ARCHITECTURE.md: 코어-워커-사이트 인터페이스 계약 - worker/: faster-whisper 한국어 STT, 음량 정규화, 4단계 잡음 판정, 사전 교정, GPU 감지·모델/CUDA 다운로드, 롤 채팅 OCR·r3dlog, 파인튜닝 파이프라인 (39 tests) - app/src/core: 디스코드 DAVE 음성 녹음(Ogg Opus), STT 대기열, 발로란트/롤 로컬 API 어댑터, 타임라인·기록 API, 사이트 중계, 7일 음성 삭제, 진단 - tools/gen-dictionary.mjs: 공식 게임 데이터 기반 기본 단어사전 (1993단어) - M0 결과: DAVE 연결 1.06s Ready, CPU tiny STT 3.6s→0.31s, 가짜 Riot 서버 통합 테스트 통과 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
51 lines
1.7 KiB
Python
51 lines
1.7 KiB
Python
# -*- mode: python ; coding: utf-8 -*-
|
|
# PyInstaller onedir 빌드: pyinstaller gvr-worker.spec → dist/gvr-worker/gvr-worker.exe
|
|
# 콘솔 앱이지만 부모(Electron)가 windowsHide 로 띄우므로 창은 보이지 않는다.
|
|
import sys
|
|
|
|
from PyInstaller.utils.hooks import collect_data_files, collect_dynamic_libs, collect_submodules
|
|
|
|
datas = []
|
|
binaries = []
|
|
hiddenimports = []
|
|
|
|
# faster-whisper: Silero VAD onnx (assets/)
|
|
datas += collect_data_files("faster_whisper")
|
|
# CTranslate2 / onnxruntime / PyAV 네이티브 라이브러리
|
|
for pkg in ("ctranslate2", "onnxruntime", "av"):
|
|
binaries += collect_dynamic_libs(pkg)
|
|
hiddenimports += collect_submodules("av")
|
|
hiddenimports += ["pyloudnorm", "scipy.signal", "scipy.ndimage", "pynvml", "mss"]
|
|
|
|
# Windows OCR (pywinrt) — 윈도우에서만
|
|
if sys.platform == "win32":
|
|
hiddenimports += collect_submodules("winrt")
|
|
binaries += collect_dynamic_libs("winrt")
|
|
hiddenimports += ["PIL.Image"]
|
|
|
|
# 파인튜닝 스크립트는 별도 파이썬 환경에서 돌리므로 모듈로 묶지 않고 파일로만 넣는다
|
|
datas += [("gvr_worker/finetune/*.py", "gvr_worker/finetune"),
|
|
("gvr_worker/finetune/requirements.txt", "gvr_worker/finetune")]
|
|
|
|
a = Analysis(
|
|
["run_worker.py"],
|
|
pathex=["."],
|
|
binaries=binaries,
|
|
datas=datas,
|
|
hiddenimports=hiddenimports,
|
|
excludes=["gvr_worker.finetune", "torch", "transformers", "peft", "tkinter", "matplotlib", "IPython",
|
|
"pytest"],
|
|
noarchive=False,
|
|
)
|
|
pyz = PYZ(a.pure)
|
|
exe = EXE(
|
|
pyz,
|
|
a.scripts,
|
|
[],
|
|
exclude_binaries=True,
|
|
name="gvr-worker",
|
|
console=True,
|
|
upx=False,
|
|
)
|
|
coll = COLLECT(exe, a.binaries, a.datas, strip=False, upx=False, name="gvr-worker")
|