@echo off rem ============================================================ rem AI ZhuiGuang voice engine - single-file installer rem __ONE_FILE_SETUP_V1__ 2026-10-30 rem Double-click this one file. It downloads the 6.6 MB install kit from rem aizhuiguang.tech, unpacks it, then the kit downloads the engine and rem the models from their official homes (resume supported). rem ============================================================ title AI ZhuiGuang - voice engine setup setlocal EnableExtensions set "KITURL=https://aizhuiguang.tech/downloads/aizg-voice-engine-202610300756.zip" if defined AIZG_KIT_URL set "KITURL=%AIZG_KIT_URL%" set "KITSHA=909a1366693a7b8652fc6f5f943767d90d57e936ed737057ba0f2e05a2845b1d" if defined AIZG_KIT_SHA set "KITSHA=%AIZG_KIT_SHA%" echo. echo ============================================================ echo AI ZhuiGuang voice engine - one-click setup echo Voices (9 studio voices + cloning + voice design) and subtitles, echo all free and running on your own computer. echo ============================================================ echo. rem ---------- where to install: D: if it exists, else C: ---------- set "DEST=C:\ZhuiGuangEngine" if exist D:\ set "DEST=D:\ZhuiGuangEngine" if defined AIZG_DEST set "DEST=%AIZG_DEST%" echo Install folder: %DEST% choice /c YN /t 15 /d Y /m " Use this folder (N = type another one)" if errorlevel 2 ( set /p "DEST= Folder (English letters only, e.g. E:\ZhuiGuangEngine): " ) echo %DEST%| findstr /r "[^A-Za-z0-9:\\_.-]" >nul && ( echo [!] Please use a path with English letters and digits only, no spaces. pause exit /b 1 ) if not exist "%DEST%" mkdir "%DEST%" if not exist "%DEST%" ( echo [ERROR] cannot create %DEST% & pause & exit /b 1 ) rem ---------- download the kit (6.6 MB) ---------- set "ZIP=%TEMP%\aizg-voice-engine.zip" echo. echo [1/3] Downloading the install kit ... curl.exe -L --fail --retry 5 --retry-delay 3 -o "%ZIP%" "%KITURL%" if errorlevel 1 ( echo [ERROR] download failed - check the internet and run again. & pause & exit /b 1 ) set "GOT=" for /f "skip=1 tokens=* delims=" %%h in ('certutil -hashfile "%ZIP%" SHA256 ^| findstr /r "^[0-9a-fA-F ]*$"') do if not defined GOT set "GOT=%%h" set "GOT=%GOT: =%" if /i not "%GOT%"=="%KITSHA%" ( echo [ERROR] the downloaded kit is damaged ^(checksum mismatch^). Run this file again. del "%ZIP%" >nul 2>&1 pause exit /b 1 ) echo checksum OK rem ---------- unpack (keeps downloaded models when updating) ---------- echo [2/3] Unpacking to %DEST% ... set "TMPX=%TEMP%\aizg_kit_x" if exist "%TMPX%" rmdir /s /q "%TMPX%" mkdir "%TMPX%" rem .NET keeps the Chinese file names (tar.exe drops them on some code pages) powershell -NoProfile -Command "Add-Type -AssemblyName System.IO.Compression.FileSystem; [IO.Compression.ZipFile]::ExtractToDirectory('%ZIP%', '%TMPX%')" if not exist "%TMPX%\ZhuiGuangEngine\zhuiguang_models.bat" tar.exe -xf "%ZIP%" -C "%TMPX%" if not exist "%TMPX%\ZhuiGuangEngine\zhuiguang_models.bat" ( echo [ERROR] unpack failed. & pause & exit /b 1 ) robocopy "%TMPX%\ZhuiGuangEngine" "%DEST%" /E /NFL /NDL /NJH /NJS /NP >nul rmdir /s /q "%TMPX%" >nul 2>&1 del "%ZIP%" >nul 2>&1 if defined AIZG_SKIP_INSTALL ( echo [test] unpacked only & exit /b 0 ) rem ---------- run the kit's one-click installer ---------- echo [3/3] Installing engine and models (first time 10-30 minutes) ... cd /d "%DEST%" call "%DEST%\zhuiguang_install.bat" endlocal