Ariver
2026-06-30 ac31349b32d89b2798cd20224fcdede91d6bfe05
Capture Windows QA target text
4 files modified
41 ■■■■ changed files
CHANGELOG.md 2 ●●● patch | view | raw | blame | history
CODEGRAPH.md 2 ●●● patch | view | raw | blame | history
privatevoice.src/scripts/QA-WINDOWS-PREVIEW.ps1 33 ●●●● patch | view | raw | blame | history
privatevoice.src/scripts/build-windows-preview.sh 4 ●●●● patch | view | raw | blame | history
CHANGELOG.md
@@ -16,7 +16,7 @@
### Windows 技术预览
- **新增 Windows 预览构建脚本**:`privatevoice.src/scripts/build-windows-preview.sh` 可生成 Windows x64 预览目录和 zip。
- **内置 Windows 真机 QA 采集脚本**:预览包包含 `QA-WINDOWS-PREVIEW.ps1`,用于启动 App、提示完成一次听写,并收集日志证据。
- **内置 Windows 真机 QA 采集脚本**:预览包包含 `QA-WINDOWS-PREVIEW.ps1`,用于启动 App、打开 Notepad 目标文件、提示完成一次听写,并收集日志和目标文本证据。
- **预览版只开放 SenseVoice**:Windows build 中其他模型仍可见但置灰禁用,避免用户选择尚未验证的模型导致启动或识别失败。
- **打包 sherpa/onnxruntime 运行时 DLL**:预览包包含 `onnxruntime.dll`、`sherpa-onnx-c-api.dll`、`sherpa-onnx-cxx-api.dll`。
- **交付边界**:该产物是 Windows 技术预览,不是已签名安装器,也未完成 Windows 10/11 真机 QA。
CODEGRAPH.md
@@ -58,6 +58,6 @@
## Known Gaps
- Windows runtime QA must still be performed on Windows 10/11 hardware.
- Run `QA-WINDOWS-PREVIEW.ps1` from the extracted preview package to collect startup, engine, recording, recognition, and paste evidence.
- Run `QA-WINDOWS-PREVIEW.ps1` from the extracted preview package to collect startup, engine, recording, recognition, paste, and Notepad target text evidence.
- The Windows preview zip is unsigned and not an installer.
- SmartScreen / Defender prompts are expected for local testing.
privatevoice.src/scripts/QA-WINDOWS-PREVIEW.ps1
@@ -38,6 +38,7 @@
$LogPath = Join-Path $AppDataDir "app.log"
$Timestamp = Get-Date -Format "yyyyMMdd-HHmmss"
$EvidenceDir = Join-Path $PackageDir "qa-evidence-$Timestamp"
$TargetPath = Join-Path $EvidenceDir "qa-target.txt"
$Results = [System.Collections.Generic.List[string]]::new()
New-Item -ItemType Directory -Path $EvidenceDir -Force | Out-Null
@@ -84,12 +85,36 @@
if (-not $CollectOnly) {
    Write-Step "Manual runtime check"
    @(
        "PrivateVoice Windows Preview QA Target",
        "Click after the marker below, dictate one short Chinese sentence, then press Ctrl+S in Notepad.",
        "DICTATION_RESULT:"
    ) | Set-Content -Encoding UTF8 $TargetPath
    try {
        Start-Process -FilePath "notepad.exe" -ArgumentList "`"$TargetPath`"" | Out-Null
        Add-Result $Results "Notepad target launched" $true $TargetPath
    } catch {
        Add-Result $Results "Notepad target launched" $false $_.Exception.Message
    }
    Write-Host "1. Keep this PowerShell window open." -ForegroundColor White
    Write-Host "2. In PrivateVoice, make sure the SenseVoice model is installed and the engine is ready." -ForegroundColor White
    Write-Host "3. Open Notepad or a browser text field." -ForegroundColor White
    Write-Host "4. Use the configured hotkey and speak: 这是 Windows 预览版测试。" -ForegroundColor White
    Write-Host "5. Confirm whether the text appears in the target input field." -ForegroundColor White
    Read-Host "Press Enter after you complete one dictation attempt"
    Write-Host "3. Use the Notepad window opened by this script as the target input field." -ForegroundColor White
    Write-Host "4. Click after DICTATION_RESULT:, use the configured hotkey, and speak one short Chinese sentence." -ForegroundColor White
    Write-Host "5. Confirm the recognized text appears in Notepad, press Ctrl+S in Notepad, then return here." -ForegroundColor White
    Read-Host "Press Enter after you save the Notepad target file"
}
if (Test-Path $TargetPath) {
    Copy-Item $TargetPath (Join-Path $EvidenceDir "qa-target-captured.txt") -Force
    $targetText = Get-Content $TargetPath -Raw -ErrorAction SilentlyContinue
    $marker = "DICTATION_RESULT:"
    $markerIndex = $targetText.IndexOf($marker)
    $dictationText = ""
    if ($markerIndex -ge 0) {
        $dictationText = $targetText.Substring($markerIndex + $marker.Length).Trim()
    }
    $dictationText | Set-Content -Encoding UTF8 (Join-Path $EvidenceDir "qa-target-dictation-text.txt")
    Add-Result $Results "target file saved with dictation text" ($dictationText.Length -gt 0) "chars=$($dictationText.Length)"
}
Write-Step "Collecting logs"
privatevoice.src/scripts/build-windows-preview.sh
@@ -74,14 +74,14 @@
3. Right-click "QA-WINDOWS-PREVIEW.ps1" and choose "Run with PowerShell".
4. If PowerShell blocks scripts, run this command from the extracted folder:
   powershell -ExecutionPolicy Bypass -File .\\QA-WINDOWS-PREVIEW.ps1
5. Follow the on-screen checklist. It will launch the app, ask you to dictate once, and collect logs.
5. Follow the on-screen checklist. It will launch the app, open a Notepad target file, ask you to dictate once, and collect logs plus the saved target text.
6. You can also run "PrivateVoice Dictation.exe" directly after QA.
Known limitations:
- This is not a signed Windows installer.
- Real Windows audio, hotkey, paste, tray, and WebView2 behavior still need QA on Windows 10/11.
- If Windows Defender or SmartScreen blocks it, allow it only for local testing.
- The QA evidence zip may contain app logs with recognized text. Review before sharing if needed.
- The QA evidence zip may contain app logs and the saved Notepad target text. Review before sharing if needed.
EOF
(cd "$OUT_ROOT" && zip -qr "$(basename "$ZIP_PATH")" "$(basename "$OUT_DIR")")