Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,38 @@ jobs:
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
- name: Build
run: cmake --build build -j
- name: Build voice-cloning regression tests
run: cmake --build build --target fake-ffmpeg ffmpeg-decode-smoke -j
- name: Windows ffmpeg process-launch test
shell: pwsh
run: |
$fake = Get-ChildItem build -Recurse -Filter fake-ffmpeg.exe | Select-Object -First 1
$smoke = Get-ChildItem build -Recurse -Filter ffmpeg-decode-smoke.exe | Select-Object -First 1
if (-not $fake -or -not $smoke) { throw "voice-cloning test binaries not found" }

$testDir = Join-Path $env:RUNNER_TEMP 'zonos2 ffmpeg % & smoke'
New-Item -ItemType Directory -Force -Path $testDir | Out-Null
$input = Join-Path $testDir 'reference voice % &.wav'
[System.IO.File]::WriteAllText($input, 'fake audio input')

# The packaged launcher sets an absolute executable path. Both that path
# and the uploaded audio path deliberately contain cmd.exe metacharacters.
$envFfmpeg = Join-Path $testDir 'ffmpeg % & helper.exe'
Copy-Item $fake.FullName $envFfmpeg
$env:ZONOS2_FFMPEG = $envFfmpeg
& $smoke.FullName $input
if ($LASTEXITCODE -ne 0) { throw "ZONOS2_FFMPEG launch test failed" }

# The standalone CLI also promises to discover a system ffmpeg on PATH.
$pathDir = Join-Path $testDir 'path fallback'
New-Item -ItemType Directory -Force -Path $pathDir | Out-Null
Copy-Item $fake.FullName (Join-Path $pathDir 'ffmpeg.exe')
Remove-Item Env:ZONOS2_FFMPEG
$env:PATH = "$pathDir;$env:PATH"
& $smoke.FullName $input
if ($LASTEXITCODE -ne 0) { throw "PATH ffmpeg launch test failed" }
- name: Web UI speaker-upload regression test
run: node --test tests/ui-speaker-upload.test.js
- name: App smoke test
shell: bash
run: |
Expand Down
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,20 @@ add_executable(spk-encoder-cli src/spk-encoder-cli.cpp src/spk-encoder.cpp)
target_include_directories(spk-encoder-cli PRIVATE src ggml/include)
target_link_libraries(spk-encoder-cli PRIVATE ggml)

# Decoder-only smoke test. EXCLUDE_FROM_ALL keeps release builds unchanged; CI builds
# it explicitly to exercise ffmpeg process launch and binary stdout without a model.
add_executable(ffmpeg-decode-smoke EXCLUDE_FROM_ALL
tests/ffmpeg-decode-smoke.cpp
src/spk-encoder.cpp
)
target_include_directories(ffmpeg-decode-smoke PRIVATE src ggml/include)
target_link_libraries(ffmpeg-decode-smoke PRIVATE ggml)

if (WIN32)
# Deterministic stand-in for ffmpeg in the Windows process-launch regression test.
add_executable(fake-ffmpeg EXCLUDE_FROM_ALL tests/fake-ffmpeg.cpp)
endif()

# --- DAC vocoder decoder CLI (codes -> wav) ---
add_executable(dac-cli src/dac-cli.cpp src/dac.cpp)
target_include_directories(dac-cli PRIVATE src ggml/include)
Expand Down
Loading
Loading