tiny-voca-hindi / cpp /build.bat
RL10x's picture
Add inference code (Python + C++ engine + web page)
ab1b068 verified
Raw History Blame Contribute Delete
902 Bytes
@echo off
rem Build the C++ engine on Windows with the Visual Studio 2022 C++ tools (MSVC) and Ninja.
rem Output: cpp\build\tts_hi.exe (and tts_check.exe, tts_g2p_dump.exe). Needs git (CMake downloads ggml v0.29.0).
setlocal
cd /d "%~dp0"
set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
if not exist "%VSWHERE%" (echo Visual Studio 2022 or its Build Tools are needed & exit /b 1)
for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do set "VS=%%i"
if not defined VS (echo The "Desktop development with C++" workload is needed & exit /b 1)
call "%VS%\VC\Auxiliary\Build\vcvars64.bat" >nul || exit /b 1
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release || exit /b 1
cmake --build build --config Release -j 8 || exit /b 1
echo.
echo Built: %~dp0build\tts_hi.exe