| @echo off |
| setlocal |
| |
| |
| set arch=x64 |
| |
| |
| |
| set "build_dir=%~dp0\build-windows" |
| if exist "%build_dir%" rmdir /s /q "%build_dir%" |
| mkdir "%build_dir%" |
| cd /d "%build_dir%" |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| if %arch% == x64 ( |
| cmake .. -G "Visual Studio 16 2019" -A x64 |
| ) else if %arch% == x86 ( |
| cmake .. -G "Visual Studio 16 2019" -A Win32 |
| ) |
| |
| |
| |
| |
| |
| |
| |
|
|
| cmake --build . --config Release |
| cd .. |
| |
| |
| |
| pushd "%~dp0" |
| copy /Y "s0724-s0730.wav" "%build_dir%\Release" |
| copy /Y "..\lib\Windows\%arch%\ten_vad.dll" "%build_dir%\Release" |
| if errorlevel 1 ( |
| echo [Error] copy file failed |
| popd |
| exit /b 1 |
| ) |
| cd /d "%build_dir%\Release" |
| if not exist "ten_vad_demo.exe" ( |
| echo Error: ten_vad_demo.exe not found |
| exit /b 1 |
| ) |
| if not exist "s0724-s0730.wav" ( |
| echo Error: s0724-s0730.wav not found |
| exit /b 1 |
| ) |
|
|
| ten_vad_demo.exe "s0724-s0730.wav" out.txt |
| if errorlevel 1 ( |
| echo Error: ten_vad_demo.exe failed |
| exit /b 1 |
| ) |
|
|
| cd /d "%~dp0" |
| popd |
| exit /b 0 |
|
|