Repository navigation
docs: add demo GIF placeholder + VHS support #13
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Test Piper Provider | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| jobs: | |
| test-piper-linux: | |
| name: Test Piper on Linux | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Log Linux environment | |
| run: | | |
| echo "=== Linux Environment ===" | |
| uname -a | |
| cat /etc/os-release | head -5 | |
| echo "=== UCRT/glibc ===" | |
| ldd --version 2>&1 | head -1 | |
| echo "=== Piper binary deps ===" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Download Piper binary | |
| run: | | |
| mkdir -p ~/.modelforce/bin | |
| cd ~/.modelforce/bin | |
| curl -L -o piper.tar.gz "https://github.com/rhasspy/piper/releases/download/2023.11.14-2/piper_linux_x86_64.tar.gz" | |
| tar xzf piper.tar.gz | |
| find . -type f -name "piper" -exec chmod +x {} \; | |
| ls -la | |
| ls -la */ | |
| - name: Check Piper version | |
| run: | | |
| PIPER_BIN=$(find ~/.modelforce/bin -name "piper" -type f -executable | head -1) | |
| echo "Found Piper at: $PIPER_BIN" | |
| $PIPER_BIN --version | |
| echo "--- Library Versions ---" | |
| find ~/.modelforce/bin -name "*.dll" -o -name "*.so" | while read dll; do | |
| echo "File: $dll" | |
| file "$dll" | |
| done | |
| - name: Download test voice | |
| run: | | |
| mkdir -p ~/.modelforce/voices/piper | |
| cd ~/.modelforce/voices/piper | |
| curl -L -o en_US-lessac-medium.onnx "https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/medium/en_US-lessac-medium.onnx" | |
| curl -L -o en_US-lessac-medium.onnx.json "https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/medium/en_US-lessac-medium.onnx.json" | |
| ls -la | |
| - name: Test Piper synthesis | |
| run: | | |
| PIPER_BIN=$(find ~/.modelforce/bin -name "piper" -type f -executable | head -1) | |
| echo "Hello world, this is a test" | $PIPER_BIN \ | |
| --model ~/.modelforce/voices/piper/en_US-lessac-medium.onnx \ | |
| --config ~/.modelforce/voices/piper/en_US-lessac-medium.onnx.json \ | |
| --output_file ~/.modelforce/test-output.wav | |
| ls -la ~/.modelforce/test-output.wav | |
| file ~/.modelforce/test-output.wav | |
| - name: Verify output | |
| run: | | |
| if [ -f ~/.modelforce/test-output.wav ]; then | |
| echo "✅ Piper synthesis successful!" | |
| echo "Output file size: $(stat -c%s ~/.modelforce/test-output.wav) bytes" | |
| else | |
| echo "❌ Piper synthesis failed!" | |
| exit 1 | |
| fi | |
| test-piper-windows: | |
| name: Test Piper on Windows | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Log Windows environment | |
| run: | | |
| Write-Host "=== Windows Environment ===" | |
| Write-Host "OS Version: $([System.Environment]::OSVersion.Version)" | |
| Write-Host "OS Build: $((Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').CurrentBuild)" | |
| Write-Host "UBR: $((Get-ItemProperty 'HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion').UBR)" | |
| systeminfo | Select-String "OS Name|OS Version|System Type" | |
| Write-Host "=== Processor ===" | |
| echo $env:PROCESSOR_ARCHITECTURE | |
| Write-Host "=== UCRT Version ===" | |
| $ucrt = Get-Item "C:\Windows\System32\ucrtbase.dll" | |
| Write-Host "ucrtbase.dll: $($ucrt.VersionInfo.FileVersion) ($($ucrt.Length) bytes)" | |
| Write-Host "=== VC++ Runtime ===" | |
| Get-ItemProperty "HKLM:\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64" -ErrorAction SilentlyContinue | Select-Object Major, Minor, Bld | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Download Piper binary | |
| run: | | |
| New-Item -ItemType Directory -Path "$env:USERPROFILE\.modelforce\bin" -Force | |
| Invoke-WebRequest -Uri "https://github.com/rhasspy/piper/releases/download/2023.11.14-2/piper_windows_amd64.zip" -OutFile "$env:TEMP\piper.zip" | |
| Expand-Archive -Path "$env:TEMP\piper.zip" -DestinationPath "$env:USERPROFILE\.modelforce\bin" -Force | |
| Get-ChildItem "$env:USERPROFILE\.modelforce\bin" -Recurse | |
| - name: Check Piper version | |
| run: | | |
| $piperExe = Get-ChildItem "$env:USERPROFILE\.modelforce\bin" -Recurse -Filter "piper.exe" | Select-Object -First 1 | |
| Write-Host "Found Piper at: $($piperExe.FullName)" | |
| & $piperExe.FullName --version | |
| Write-Host "--- DLL Versions ---" | |
| Get-ChildItem "$env:USERPROFILE\.modelforce\bin" -Recurse -Filter "*.dll" | ForEach-Object { | |
| Write-Host "File: $($_.FullName)" | |
| Write-Host "Version: $($_.VersionInfo.ProductVersion)" | |
| } | |
| - name: Download test voice | |
| run: | | |
| New-Item -ItemType Directory -Path "$env:USERPROFILE\.modelforce\voices\piper" -Force | |
| Invoke-WebRequest -Uri "https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/medium/en_US-lessac-medium.onnx" -OutFile "$env:USERPROFILE\.modelforce\voices\piper\en_US-lessac-medium.onnx" | |
| Invoke-WebRequest -Uri "https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/medium/en_US-lessac-medium.onnx.json" -OutFile "$env:USERPROFILE\.modelforce\voices\piper\en_US-lessac-medium.onnx.json" | |
| Get-ChildItem "$env:USERPROFILE\.modelforce\voices\piper" | |
| - name: Test Piper synthesis | |
| run: | | |
| $piperExe = Get-ChildItem "$env:USERPROFILE\.modelforce\bin" -Recurse -Filter "piper.exe" | Select-Object -First 1 | |
| $inputFile = "$env:TEMP\piper-input.txt" | |
| Set-Content -Path $inputFile -Value "Hello world, this is a test" -Encoding ASCII | |
| Write-Host "=== Piper Location ===" | |
| Write-Host "exe: $($piperExe.FullName)" | |
| Write-Host "model: $env:USERPROFILE\.modelforce\voices\piper\en_US-lessac-medium.onnx" | |
| Write-Host "DLLs in bin:" | |
| Get-ChildItem "$env:USERPROFILE\.modelforce\bin" -Recurse -Filter "*.dll" | ForEach-Object { | |
| Write-Host " $($_.Name) - $($_.Length) bytes - $($_.VersionInfo.FileVersion)" | |
| } | |
| Write-Host "" | |
| Write-Host "=== Running synthesis ===" | |
| $process = Start-Process -FilePath $piperExe.FullName ` | |
| -ArgumentList "--model", "$env:USERPROFILE\.modelforce\voices\piper\en_US-lessac-medium.onnx", ` | |
| "--config", "$env:USERPROFILE\.modelforce\voices\piper\en_US-lessac-medium.onnx.json", ` | |
| "--output_file", "$env:USERPROFILE\.modelforce\test-output.wav" ` | |
| -RedirectStandardInput $inputFile ` | |
| -RedirectStandardOutput "$env:TEMP\piper-stdout.txt" ` | |
| -RedirectStandardError "$env:TEMP\piper-stderr.txt" ` | |
| -NoNewWindow -Wait -PassThru | |
| Write-Host "Exit code: $($process.ExitCode)" | |
| Write-Host "STDOUT:" | |
| Get-Content "$env:TEMP\piper-stdout.txt" -ErrorAction SilentlyContinue | |
| Write-Host "STDERR:" | |
| Get-Content "$env:TEMP\piper-stderr.txt" -ErrorAction SilentlyContinue | |
| Write-Host "" | |
| Write-Host "=== Output verification ===" | |
| if (Test-Path "$env:USERPROFILE\.modelforce\test-output.wav") { | |
| $file = Get-Item "$env:USERPROFILE\.modelforce\test-output.wav" | |
| Write-Host "File exists: YES" | |
| Write-Host "File size: $($file.Length) bytes" | |
| Write-Host "File created: $($file.CreationTime)" | |
| if ($file.Length -gt 44) { | |
| Write-Host "WAV header check: File is large enough to be a valid WAV" | |
| } else { | |
| Write-Host "WAV header check: File too small, likely invalid" | |
| } | |
| if ($process.ExitCode -eq 0) { | |
| Write-Host "RESULT: SUCCESS" | |
| } else { | |
| Write-Host "RESULT: FAILED (exit code $($process.ExitCode))" | |
| } | |
| } else { | |
| Write-Host "File exists: NO" | |
| Write-Host "RESULT: FAILED - No output file" | |
| if ($process.ExitCode -eq -1073740791) { | |
| Write-Host "ERROR: STATUS_STACK_BUFFER_OVERRUN (0xC0000409)" | |
| } | |
| } | |
| test-sdk-integration: | |
| name: Test SDK Integration | |
| runs-on: ubuntu-latest | |
| needs: test-piper-linux | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Run SDK tests | |
| run: | | |
| cd packages/sdk | |
| node dist/__tests__/sdk.test.js |