v1.3.6: 목소리 깨짐(RTP 기준 쉼 채우기) · 알 수 없음 · 잡음 숨기기/삭제 · 사이트 로그 · 지금 게임 · TTS 속도 · 시작 창

- 녹음기: 패킷 도착 간격 대신 RTP 타임스탬프로 자리를 정한다. 게임 중 몰려 온 패킷 사이에 무음이 끼어 목소리가 깨졌다. 예전 녹음은 한 번 고친 뒤 다시 변환
- users.updated 를 빈 목록으로 보내 사이트에서 말한 사람이 '알 수 없음'이 되던 것
- 잡음은 숨기고 ogg 삭제, 로그에 잡음으로 남김. 짧은 목소리도 Whisper 로, 반복 고리는 줄여서 보여 줌
- 사이트: 재생 음량, 발화 우클릭(자세한 정보 · ogg 다운로드), 사이트 로그(/logs, 게임 PC 꺼져도), 지금 게임 상태
- 앱: 지금 게임 상태, 녹음 안내 말 속도 0.1~2.0, 포터블 · 앱 시작 창
- 발로란트 데스매치 가짜 라운드 · 에이스, 빈 선수 이름

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
EJClaw
2026-10-16 05:01:14 +09:00
parent 2ffb18263c
commit fa6126e17f
66 changed files with 2265 additions and 128 deletions

View File

@@ -2,3 +2,4 @@ export * from './protocol.js';
export * from './time.js';
export * from './rating.js';
export * from './rating-model.js';
export * from './live-game.js';

View File

@@ -0,0 +1,35 @@
import type { LiveGame } from './protocol.js';
import { fmtClock } from './time.js';
export const GAME_NAME: Record<LiveGame['game'], string> = { valorant: '발로란트', lol: '리그 오브 레전드' };
/** 지금 게임 상태를 한 줄로 (헤더 · 알림용): "경쟁전 · 어센트 · R15 8:6" */
export function liveGameLine(g: LiveGame): string {
if (!g.inMatch) return g.phase + (g.mode && g.connected ? ` · ${g.mode}` : '');
const parts = [g.mode, g.map].filter(Boolean) as string[];
if (g.round != null && g.score) parts.push(`R${g.round} ${g.score.ally}:${g.score.enemy}`);
else if (g.score) parts.push(`${g.score.ally}:${g.score.enemy}`);
if (g.gameTimeSec != null) parts.push(fmtClock(g.gameTimeSec * 1000));
return parts.join(' · ') || '경기 중';
}
/** 지금 게임 상태 자세히 (앱 게임 연동 탭 · 사이트 패널): [항목, 값] */
export function liveGameRows(g: LiveGame, now = Date.now()): [string, string][] {
const rows: [string, string][] = [['상태', g.phase]];
if (g.self?.name) rows.push(['내 계정', g.self.name]);
if (g.mode) rows.push(['모드', g.mode]);
if (g.map) rows.push(['맵', g.map]);
if (g.inMatch) {
if (g.round != null) rows.push(['라운드', `${g.round}라운드`]);
if (g.score) rows.push([g.round != null ? '점수 (우리 : 상대)' : '점수', `${g.score.ally} : ${g.score.enemy}`]);
if (g.gameTimeSec != null) rows.push(['게임 시간', fmtClock(g.gameTimeSec * 1000)]);
else if (g.startedAt) rows.push(['경과', fmtClock(Math.max(0, now - g.startedAt))]);
if (g.teamKills) rows.push(['팀 킬 (우리 : 상대)', `${g.teamKills.ally} : ${g.teamKills.enemy}`]);
if (g.self?.character) rows.push([g.game === 'lol' ? '내 챔피언' : '내 요원', g.self.character]);
if (g.self?.kda) rows.push(['KDA', g.self.kda]);
if (g.self?.extra) rows.push(['내 성적', g.self.extra]);
if (g.players) rows.push(['인원', `${g.players}명`]);
}
if (g.error) rows.push(['오류', g.error]);
return rows;
}

View File

@@ -32,6 +32,42 @@ export interface User {
export type UtteranceStatus = 'pending' | 'realtime' | 'precise' | 'failed';
/** 발화 자세한 정보 (사이트 우클릭 → 자세한 정보, v1.3.6~) */
export interface UtteranceInfo {
id: string;
userId: string;
/** 원본 음성 파일 이름 (예: 0mv9wpior2f765541ac.ogg) */
fileName: string | null;
/** 게임 PC 안의 전체 경로 */
path: string | null;
/** 파일이 있는 폴더 */
folder: string | null;
/** 파일 크기 (바이트), 지워졌으면 null */
sizeBytes: number | null;
/** 파일이 지워진 이유: 보관 기간 · 잡음 · 파일 없음 */
deleted: null | 'retention' | 'noise' | 'missing';
startedAt: number;
endedAt: number;
durationMs: number;
/** 녹음 세션 · 음성채널 */
sessionId: string | null;
channel: string | null;
matchId: string | null;
status: string;
model: string | null;
confidence: number | null;
lufs: number | null;
gainDb: number | null;
/** 사전 교정 전 원래 인식 결과 */
rawText: string | null;
text: string | null;
corrected: boolean;
noise: boolean;
noiseReason: string | null;
attempts: number;
createdAt: number;
}
export interface UtteranceItem {
kind: 'utterance';
id: string;
@@ -208,11 +244,47 @@ export interface MatchDetail extends MatchSummary {
| null;
}
/** 지금 연결된 게임 · 진행 중인 경기 (앱 게임 연동 탭 · 사이트, v1.3.6~) */
export interface LiveGame {
game: GameType;
/** 연동을 켰는지 */
enabled: boolean;
/** 게임 클라이언트(Riot 클라이언트 · 롤 클라이언트)에 연결됨 */
connected: boolean;
/** 지금 상태: 꺼짐 · 메뉴 · 대기열 · 요원 선택 · 경기 중 · 경기 끝 … */
phase: string;
inMatch: boolean;
matchId: string | null;
/** 모드 이름 (경쟁전, 신속플레이, 데스매치, 솔로 랭크, 칼바람 나락 …) */
mode: string | null;
map: string | null;
mapImage: string | null;
/** 경기 시작 시각 (PC 시계) */
startedAt: number | null;
/** 발로란트 라운드제 모드: 지금 라운드 */
round: number | null;
/** 발로란트 점수. 라운드제는 팀 점수, 데스매치 등은 게임이 주는 점수 */
score: { ally: number; enemy: number } | null;
/** 롤: 게임 시간(초) */
gameTimeSec: number | null;
/** 롤: 팀 킬 */
teamKills: { ally: number; enemy: number } | null;
/** 내 계정 · 요원/챔피언 · 성적 */
self: { name: string | null; character: string | null; characterImage: string | null; kda: string | null; extra: string | null } | null;
/** 경기 인원 */
players: number | null;
/** 마지막 오류 (연결 실패 등) */
error: string | null;
updatedAt: number;
}
export interface Overview {
guild: { id: string; name: string; icon: string | null } | null;
recording: { active: boolean; channel: string | null; since: number | null; participants: string[] };
users: User[];
games: { valorant: { connected: boolean; inMatch: boolean }; lol: { connected: boolean; inMatch: boolean } };
/** 지금 게임 상태 (v1.3.6~ 앱만 보냄) */
live?: LiveGame[];
counts: { utterances: number; matches: number };
version: string;
}
@@ -320,7 +392,8 @@ export type LiveEvent =
| { type: 'event.created'; data: EventItem }
| { type: 'match.updated'; data: MatchSummary }
| { type: 'recording.state'; data: Overview['recording'] }
| { type: 'users.updated'; data: User[] };
| { type: 'users.updated'; data: User[] }
| { type: 'games.state'; data: LiveGame[] };
export interface DeviceStatus {
registered: boolean;