10 Commits

Author SHA1 Message Date
EJClaw
c1d9242b81 voice-changer installer 1.0.4: refuse admin-token deploy; do not carry over the v1.0.2 uninstall log
Review/arbiter REVISE on 85f5782:
- If the installer is started elevated ("Run as administrator", admin terminal), ExecAsOriginalUser is
  elevated too, so deploy.ps1 copied into the user's folder and ran its scripts with admin rights.
  deploy.ps1 now checks the real token first (WindowsPrincipal.IsInRole(Administrator)) and exits 33
  before touching any path; the installer explains to start it by double-click. The post-install launch
  only runs when deploy succeeded (Check: DeployDone).
- v1.0.2 and later share AppId and uninstall dir, and the default UninstallLogMode=append kept v1.0.2's
  entries for files in the user's folder, which the elevated uninstaller would delete through a junction.
  UninstallLogMode=overwrite starts a fresh log. Since pre-existing folders are then not recorded as
  created, the uninstaller removes Program Files\VoiceChanger's apo\ scripts\ payload\ itself and launches
  a detached `rmdir` for the then-empty uninstall\ and install folder (Program Files only).

Windows 11 VM, Inno 6.7.4, AppVersion 1.0.4 (final build):
- A: setup started from an elevated process with /DATADIR=<Desktop>\VCA: deploy exit 33, the folder was
  never created, no shortcuts; REFUSED_BEFORE_WRITE PASS.
- L: deploy.ps1 under the logged-on user's limited token (Administrators deny-only) copies the app,
  folder owned by the user.
- C (control): v1.0.2 on Desktop -> v1.0.3, unins000.dat mentions Desktop\VC2; folder swapped for a junction
  to admin-only C:\vctarget, uninstall deletes the target's same-named files (FAIL, the bug).
- B: v1.0.2 on Desktop -> 1.0.4: unins000.dat no longer mentions it; same swap + uninstall: target files and
  SDDL unchanged (PASS); Program Files\VoiceChanger fully removed.
- R: fresh -> reinstall -> uninstall: Program Files\VoiceChanger fully removed; FxProperties restored.
- python unittest: 16 run, 2 skipped (tkinter missing).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 23:04:18 +09:00
EJClaw
85f5782876 voice-changer installer: never touch the chosen folder with admin rights (1.0.3)
Review of c24cd1f: with a user-owned parent (Desktop), the user could swap the chosen folder for a junction
to a protected folder after secure-dir Prepare, and the elevated Finish would grant Users modify on the
target's config\ etc. Any elevated path operation on a user-controlled path has this race, so the elevated
installer now only works in Program Files.

- VoiceChanger.iss: {app} is always {commonpf}\VoiceChanger (apo\, scripts\mic-apo.ps1, scripts\deploy.ps1,
  uninstall\, payload\). The user's folder comes from a custom page (/DATADIR=, previous DataDir, or the
  v1.0.x App Path) and is only read for checks. deploy.ps1 runs with ExecAsOriginalUser: copies payload,
  moves data folders of an older install, runs install.ps1. Shortcuts are created after the copy
  (CreateShellLink; [Icons] made empty-target links) and the postinstall launch runs as the original user.
  Uninstall restores the mic settings and removes Program Files only; the user's folder is left (message).
- legacy.ps1 (replaces secure-dir.ps1): for a v1.0.0/1.0.1 folder (admin-locked, uninstall\ inside) deletes the
  old executable parts by name, moves the mic backup to Program Files and renames the folder to <dir>.old,
  only if no non-admin principal can delete/rename the folder or any ancestor (owner + ACL check; ACLs can
  only be changed by admins, so the check stays valid during the operation). Otherwise refuses (exit 20).
- deploy.ps1 (user level): refuses a junction; a v1.0.2 admin-locked folder under a user-owned parent is
  renamed aside by the user and its data folders moved into a fresh folder.
- mic-apo.ps1: back to its pre-c24cd1f logic (no -From); header documents the Program Files root.

Windows 11 VM, Inno 6.7.4, AppVersion 1.0.3:
- J: chosen folder = junction to admin-owned C:\vctarget (config\keep.txt, protected ACL): setup exit 0,
  legacy exit 0, deploy exit 31; target files + SDDL unchanged after setup, after limited-token deploy
  (exit 31), after limited-token write/icacls/rename attempts (all denied), and after uninstall.
- J2: same target with uninstall\unins000.exe: legacy exit 20, setup aborted (exit 7), target unchanged.
- U1: v1.0.1 at C:\VoiceChanger -> 1.0.3 with the default folder: legacy exit 1, backup moved byte-equal,
  models\mine.txt kept, C:\VoiceChanger.old removed, APO from Program Files; uninstall restores FxProperties.
- U2: v1.0.2 on Desktop -> limited-token deploy renamed it aside, moved models, new folder owned by the user;
  1.0.3 setup on it exit 0; uninstall restores FxProperties, folder and models kept.
- D: fresh Desktop install with full engine download: deploy exit 0, admin_root = Program Files,
  audiodg loads the Program Files DLL, APO 440 Hz + Communications PASS, Start menu/desktop shortcuts point
  at <Desktop>\VoiceChanger\VoiceChanger.exe and are removed on uninstall.
- python unittest: 16 run, 2 skipped (tkinter missing).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 22:51:52 +09:00
EJClaw
c24cd1f9c0 voice-changer: allow installing under user-owned folders (Desktop); move admin-run parts to Program Files
The installer refused folders whose parent is user-owned (Desktop, Documents) because a user could swap
the whole install folder and get the elevated/audiodg-run parts replaced. Instead of refusing, the parts
that run with admin rights or inside audiodg now live in {commonpf}\VoiceChanger, which only admins can
change; the chosen folder keeps the app, Python, engine, models and data.

- VoiceChanger.iss: SysDir = {commonpf}\VoiceChanger holds apo\ (VoiceChangerAPO.dll), scripts\mic-apo.ps1
  and the uninstaller (UninstallFilesDir). CheckParent removed. Upgrade detection also matches the previous
  install dir from the uninstall registry (PrevAppDir) since uninstall\ is no longer inside the app folder.
  Stop the audio service when either the new or the v1.0.1-layout APO exists. Ask before installing into
  a OneDrive-synced folder.
- secure-dir.ps1: drop CheckParent; Prepare takes -Upgrade.
- mic-apo.ps1: -From <previous app folder> migrates a v1.0.1 apo\ or 21b4278 config\ backup (validated as
  before) into the Program Files apo\, removing the emptied old apo\.
- app: admin_root() finds Program Files\VoiceChanger (falls back to the app folder for the zip layout);
  hooked-mic list, mic-apo log and the reconnect button use it.

Windows 11 VM (Inno 6.7.4 build, AppVersion 1.0.2): v1.0.1 at C:\VoiceChanger -> upgrade: backup moved
byte-equal, APO re-pointed to Program Files, old apo\ scripts\mic-apo.ps1 uninstall\ gone; fresh install to
C:\Users\ci\Desktop\VoiceChanger (owner WIN-CI\ci) with full engine download: exit 0, audiodg loads
C:\Program Files\VoiceChanger\apo\VoiceChangerAPO.dll, 440 Hz APO test + Communications stream PASS;
basic-user token can rename the Desktop folder but every Program Files write/rename is ERROR_ACCESS_DENIED;
reinstall over the same folder keeps user files; uninstall restores FxProperties (only the endpoint
timestamp properties differ, same as v1.0.1) and removes both folders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 22:09:39 +09:00
EJClaw
32ad429773 Pick recording servers from the voice-changer app; fix per-server recording status
consent-recorder: operators (ADMIN_DISCORD_IDS) create an app key on the
site; the app calls GET/POST /api/guilds with it to turn servers on/off.
Turned-off servers are left immediately. recordingNow() now checks the
user picked that server, so someone who only chose server A is not shown
as recorded while sitting in a B channel the bot records for others.

voice-changer: new "녹음 서버" dialog (record_servers.py), network in a
worker thread, key saved in config/record-servers.json; upgrade cleanup
list knows the new file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 21:16:53 +09:00
EJClaw
3a40645b12 voice-changer: upgrade cleanup deletes only files shipped by earlier builds
secure-dir.ps1 Prepare used to delete every root file (and whole scripts/app/launcher/uninstall
dirs) when upgrading. It now removes only the named files of earlier distributions (plus the
uninstall logs, which run elevated) and empty dirs; any other file stays and is only re-owned
by Administrators with inherited permissions.

Windows 11 VM: 21b4278 install + root sample.wav, models\keep.wav, scripts\note.txt ->
upgrade -> SHA256 unchanged for all three (also after silent uninstall).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 19:22:44 +09:00
EJClaw
c62bd9cf39 voice-changer: lock install folder ownership, migrate old mic backup, refresh comm modes on upgrade
- installer/secure-dir.ps1 (run elevated from tmp):
  CheckParent: refuse folders whose nearest existing parent is not a drive root or owned by
  Administrators/SYSTEM/TrustedInstaller.
  Prepare (before files are copied): owner Administrators + protected DACL (SY/BA full, Users RX),
  verify, abort setup on failure; refuse links pointing outside the folder; on upgrade delete the
  old executable parts (scripts/app/launcher/uninstall/root files) that 21b4278 left user-writable.
  Finish: Users modify only on data dirs; verify every admin-run file is admin-owned and not
  user-writable, otherwise skip APO registration and engine download.
- mic-apo.ps1: migrate config\mic-apo-backup.json to apo\ with value validation (CLSID/mode GUID/
  DWORD only, own CLSID stripped), never record our own APO as the original value, upgrade the
  DEFAULT-only mode list written by 21b4278 to DEFAULT/COMMUNICATIONS/SPEECH/MEDIA, remove the
  old config\mic-apo.json.

Windows 11 VM: user-precreated folder -> owner BA, basic-user WRITE_DAC/WRITE_OWNER/grant/icacls/
write/rename all ERROR_ACCESS_DENIED; user-owned parent refused (CheckParent exit 20);
21b4278 install -> upgrade: backup migrated, modes refreshed, Communications capture 440 Hz,
uninstall restores FxProperties to the pre-install state.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 19:01:36 +09:00
EJClaw
ffc553851a voice-changer: fix review findings (install-folder ACL, scoped uninstall delete, comm-mode APO, reconnect)
- installer: lock the install folder (admins/SYSTEM full, Users read) and grant Users modify only on
  data dirs (models/training/datasets/config/cache/env/engine/tools); download the engine as the
  original (non-elevated) user; refuse non-empty folders; uninstall deletes only app-managed dirs
- mic-apo.ps1: backup/list/log moved to admin-only apo\; register SFX for DEFAULT, COMMUNICATIONS,
  SPEECH and MEDIA when the endpoint has no mode list; admin TEMP for Add-Type; run log + trap
- app: '마이크 다시 연결' launches one elevated PowerShell via ShellExecuteExW(runas) with
  double-quoted -File args and waits for its exit code; shows apo\mic-apo.log on failure
- tests: reconnect argument splitting (Korean/space/quote/drive root)

Verified on the Windows 11 VM: basic-user token gets ERROR_ACCESS_DENIED on scripts/apo/exe/
uninstall/app and write access only on data dirs; Communications-category capture receives the
converted signal (440 Hz); reconnect exits 0 from a Korean+space install path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 18:00:20 +09:00
EJClaw
21b4278b77 voice-changer: one-click installer, mic APO instead of virtual cable, keep all files in install folder
- apo/: VoiceChangerAPO.dll (SFX APO on the real mic, built with mingw). When the app converts,
  the mic's own stream carries the converted voice; otherwise it passes the real voice through.
  Shared-memory protocol in vccore.h, Python side app/mic_bridge.py
- scripts/mic-apo.ps1: register/unregister on every capture endpoint with admin value rights only
  (no ACL changes unless FxProperties is missing), originals backed up and restored
- app: mic is the conversion target (WASAPI names), no output device, '마이크 다시 연결' button,
  44.1k<->48k streaming resample, caches/temp redirected into <install>/cache
- installer/VoiceChanger.iss (Inno Setup): choose install folder, register APO, download engine
  into that folder, uninstall restores mic settings and asks before deleting models
- install.ps1: uv python --no-bin --no-registry, temp/caches inside the folder, uv cache clean
- tests: C core compiled with gcc against the Python bridge; converter pump 44.1k round trip

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 16:33:15 +09:00
EJClaw
ab599c0751 voice-changer: always stream at 48kHz, redo interrupted example extraction
- Applio's realtime engine treats incoming audio as 48kHz; opening a 44.1kHz
  device at its default rate skewed pitch and timing. Streams now always open
  at 48kHz (MME/DirectSound resample, WASAPI auto_convert), with a clear error
  if a device refuses it.
- KSS/Zeroth example datasets write a completion marker (with minutes) last;
  a partial folder from an interrupted run is wiped and re-extracted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 14:41:06 +09:00
EJClaw
b0460fdff7 Add Windows realtime voice changer (RVC via Applio) + set operator to 사금향
- voice-changer/: install.bat (uv + Python 3.12 + pinned Applio + torch cu128),
  VoiceChanger.exe launcher (mingw), tkinter GUI (model list, auto ±12 pitch
  across genders, mic/output/monitor devices, latency, noise gate),
  train.bat (preprocess/extract/train/index → models/<id>), examples.bat
  (Korean example models from KSS + Zeroth-Korean), build-release.sh
- consent-recorder: default OPERATOR_NAME=사금향

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 14:34:03 +09:00