- 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>
17 lines
686 B
TypeScript
17 lines
686 B
TypeScript
/** ms → "m:ss" (1시간 넘으면 "h:mm:ss") */
|
|
export function fmtClock(ms: number): string {
|
|
const neg = ms < 0;
|
|
let s = Math.floor(Math.abs(ms) / 1000);
|
|
const h = Math.floor(s / 3600);
|
|
s -= h * 3600;
|
|
const m = Math.floor(s / 60);
|
|
s -= m * 60;
|
|
const body = h > 0 ? `${h}:${String(m).padStart(2, '0')}:${String(s).padStart(2, '0')}` : `${m}:${String(s).padStart(2, '0')}`;
|
|
return neg ? `-${body}` : body;
|
|
}
|
|
|
|
/** 현실 시각 → "HH:MM:SS" (Asia/Seoul) */
|
|
export function fmtReal(ts: number, tz = 'Asia/Seoul'): string {
|
|
return new Intl.DateTimeFormat('ko-KR', { timeZone: tz, hour: '2-digit', minute: '2-digit', second: '2-digit', hour12: false }).format(ts);
|
|
}
|