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

@@ -24,6 +24,7 @@ function defaults(): Settings {
ttsText: '겜녹이가 이 음성채널을 녹음합니다. 녹음된 대화는 AI 경기 분석에 쓰일 수 있어요. 녹음을 원하지 않으시면 녹음제외 명령을 입력해 주세요.',
ttsOnNewMember: true,
ttsVoice: 'ko-KR-SunHiNeural',
ttsRate: 1,
},
games: { valorant: true, lol: true, lolLogsDir: null },
stt: {
@@ -158,6 +159,17 @@ export function createMockGvr(): GvrApi {
valorant: { connected: true, inMatch: false, detail: 'Riot Client 연결됨 · 대기실' },
lol: { connected: false, inMatch: false, detail: '클라이언트 꺼짐' },
},
liveGames: [
{
game: 'valorant', enabled: true, connected: true, phase: '경기 중', inMatch: true, matchId: 'val-demo', mode: '경쟁전', map: '어센트', mapImage: null,
startedAt: now - 23 * 60000, round: 15, score: { ally: 8, enemy: 6 }, gameTimeSec: null, teamKills: null,
self: { name: '하늘#KR1', character: '제트', characterImage: null, kda: null, extra: null }, players: 10, error: null, updatedAt: now,
},
{
game: 'lol', enabled: true, connected: true, phase: '로비', inMatch: false, matchId: null, mode: '솔로 랭크', map: null, mapImage: null,
startedAt: null, round: null, score: null, gameTimeSec: null, teamKills: null, self: { name: '하늘#KR1', character: null, characterImage: null, kda: null, extra: null }, players: null, error: null, updatedAt: now,
},
],
counts: { utterances: 1824, matches: 37 },
excludedUsers: noToken ? [] : [{ id: 'u4', name: '현우' }],
autoStart: false,

View File

@@ -316,3 +316,43 @@ input[type='number'].input { flex: none; padding: 7px 8px; }
.admin-list { list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.admin-list li { display: flex; gap: 8px; align-items: baseline; }
.admin-list li .muted { font-size: 12px; }
/* 지금 게임 (게임 연동 탭) */
.live-games {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 12px;
}
.live-game {
border: 1px solid var(--line, #22313f);
border-radius: 10px;
padding: 12px 14px;
background: rgba(255, 255, 255, 0.02);
}
.live-game.in-match.valorant {
border-color: rgba(255, 70, 85, 0.55);
}
.live-game.in-match.lol {
border-color: rgba(200, 170, 110, 0.6);
}
.live-game-top {
display: flex;
align-items: center;
gap: 8px;
margin-bottom: 8px;
}
.live-game-top .badge {
margin-left: auto;
}
.live-rows {
width: 100%;
font-size: 12.5px;
border-collapse: collapse;
}
.live-rows td {
padding: 3px 0;
vertical-align: top;
}
.live-rows td:first-child {
width: 42%;
}

View File

@@ -1,7 +1,7 @@
import { useEffect, useRef, useState } from 'react';
import type { GvrApi } from '../../main/api-types';
import { gvr, useAction, useApp, useLoad } from '../store';
import { AdminOnly, Avatar, Btn, DraftInput, Err, Line, Ok, Page, Section, Select, ToggleLine, useIsAdmin } from '../ui';
import { AdminOnly, Avatar, Btn, DraftInput, Err, Line, Ok, Page, Section, Select, Slider, ToggleLine, useIsAdmin } from '../ui';
import { errMsg, fmtClock, fmtDuration } from '../util';
type TestResult = Awaited<ReturnType<GvrApi['testBotToken']>>;
@@ -248,7 +248,7 @@ function TtsPreview() {
<Btn
busy={act.busy}
onClick={async () => {
const r = await act.run(() => gvr.previewTts(settings.discord.ttsText, settings.discord.ttsVoice));
const r = await act.run(() => gvr.previewTts(settings.discord.ttsText, settings.discord.ttsVoice, settings.discord.ttsRate));
if (r?.ok && r.dataUrl) {
audio.current?.pause();
audio.current = new Audio(r.dataUrl);
@@ -337,6 +337,9 @@ export function DiscordTab() {
<Line label="목소리">
<Select width={200} value={d.ttsVoice} options={VOICES} onChange={(v) => save({ discord: { ttsVoice: v } })} />
</Line>
<Line label="말 속도" hint="0.1배(아주 느리게) ~ 2.0배(빠르게), 보통 1.0배">
<Slider value={d.ttsRate ?? 1} min={0.1} max={2} step={0.1} fmt={(v) => `${v.toFixed(1)}배`} onCommit={(v) => save({ discord: { ttsRate: Math.round(v * 10) / 10 } })} />
</Line>
<Line
label={
<>

View File

@@ -1,5 +1,5 @@
import { useState } from 'react';
import type { User } from '@gvr/shared';
import { GAME_NAME, liveGameRows, type LiveGame, type User } from '@gvr/shared';
import { gvr, useAction, useApp, useLoad } from '../store';
import { Avatar, Btn, Dot, Err, FolderRow, Page, Section, Spinner, Toggle } from '../ui';
@@ -52,6 +52,38 @@ export function GameCards({ showStatus = true }: { showStatus?: boolean }) {
);
}
/** 지금 연결된 게임 · 진행 중인 경기 자세히 (v1.3.6~) */
function LiveGames() {
const { state } = useApp();
const live = state.liveGames ?? [];
if (!live.length) return null;
return (
<Section title="지금 게임" sub="2초마다 새로 고침">
<div className="live-games">
{live.map((g: LiveGame) => (
<div key={g.game} className={`live-game ${g.game}${g.inMatch ? ' in-match' : ''}`}>
<div className="live-game-top">
<Dot tone={!g.enabled ? 'off' : g.inMatch ? 'ok' : g.connected ? 'warn' : 'off'} />
<b>{GAME_NAME[g.game]}</b>
<span className={`badge ${g.inMatch ? 'b-ok' : 'b-dim'}`}>{g.phase}</span>
</div>
<table className="live-rows">
<tbody>
{liveGameRows(g).map(([k, v]) => (
<tr key={k}>
<td className="muted">{k}</td>
<td>{v}</td>
</tr>
))}
</tbody>
</table>
</div>
))}
</div>
</Section>
);
}
const RIOT_RE = /^[^#]{1,16}#[^#\s]{2,5}$/;
function RiotRow({ u }: { u: User }) {
@@ -146,6 +178,7 @@ export function GamesTab() {
return (
<Page title="게임 연동">
<GameCards />
<LiveGames />
<Section title="리그 오브 레전드 세부 설정" className={g.lol ? '' : 'disabled'}>
<div className="muted" style={{ marginBottom: 8 }}>
롤 채팅은 롤 클라이언트(LCU) API 로 챔피언 선택 · 게임 후 채팅을 받습니다. 게임 중 전체 · 팀 채팅은 롤이 API 로 주지 않아, 게임 로그 파일에 남아 있을 때만 경기 뒤에 붙입니다. 화면 글자 인식(OCR)은 쓰지 않습니다.