From 1572ddda19594f13941a903e50c6bf8f3e36ca2f Mon Sep 17 00:00:00 2001 From: NINI Date: Mon, 5 Oct 2026 01:20:29 +0900 Subject: [PATCH] Verify voice export quality guard and record final file checks --- docs/qwen-voice-register.md | 4 +++- tools/audio/test_generate_voice.py | 12 +++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/qwen-voice-register.md b/docs/qwen-voice-register.md index bfaaae0..d96d566 100644 --- a/docs/qwen-voice-register.md +++ b/docs/qwen-voice-register.md @@ -44,6 +44,8 @@ python tools/audio/generate_voice.py --catalog SourceAssets/Audio/Voice/voice-ca python tools/audio/generate_voice.py --catalog SourceAssets/Audio/Voice/voice-catalog.json --profile SourceAssets/Audio/Voice/qwen-profile.json --validate-only --manifest SourceAssets/Audio/Voice/generated/20261004T161231511126Z_aa20f404/manifest.json ``` -Initial RED exit 1: generator module absent. GREEN: eight behavioral Python tests, exit 0, cover invalid catalogs, partial/current-profile validation, failed/nonfinite WAVs, missing/corrupt WAVs, changed clips/settings, hash tampering, preservation of originals, resampling and refusal to overwrite a different runtime draft. Actual sample synthesis, expanded synthesis and validation-only each exited 0. Validation-only neither loads nor downloads the model. Validation without IDs covers all currently required T2 clips; `--ids` records the narrower selected scope. +Initial RED exit 1: generator module absent. GREEN: nine behavioral Python tests, exit 0, cover invalid catalogs, partial/current-profile validation, failed/nonfinite WAVs, missing/corrupt WAVs, changed clips/settings, hash tampering, preservation of originals, resampling, refusal to overwrite a different runtime draft and blocking an excessively long number before export. Actual sample synthesis, expanded synthesis and validation-only each exited 0. Validation-only neither loads nor downloads the model. Validation without IDs covers all currently required T2 clips; `--ids` records the narrower selected scope. Explicit selected validation of all twelve generated clips exited 0 for file/history integrity; count_05 is still excluded for the separate quality concern. Invalid requested ID `missing` exited 1 with its ID in the error. Final `pip check` exited 0 with no broken requirements. + +Captured follow-up verification logs are under `artifacts/verification/FirstSlice/Voice/` in the implementation worktree, including `python-tests.log`, `validate-all-generated.log` and `validate-invalid-id.log`. Artifacts are ignored; source manifests and selection hashes are tracked. Unity `.meta` files must be generated through actual Editor import after integration; they are not handwritten. Required follow-up: listen to each selected utterance, record reviewer/date/approved hashes, review count_05 and future stage guidance, and test queue/mix playback in the Android device build. diff --git a/tools/audio/test_generate_voice.py b/tools/audio/test_generate_voice.py index d27d6ca..20b89c6 100644 --- a/tools/audio/test_generate_voice.py +++ b/tools/audio/test_generate_voice.py @@ -1,6 +1,5 @@ import copy import importlib.util -import json from pathlib import Path import tempfile import unittest @@ -113,6 +112,17 @@ class VoiceHistoryTests(unittest.TestCase): self.assertEqual(changed, (target / 'count_01.wav').read_bytes()) self.assertNotEqual(original, changed) + def test_long_count_is_blocked_before_export(self): + import sys + sys.path.insert(0, str(Path(__file__).parent)) + from prepare_voice import prepare + def long_take(clip): return np.ones(72000, dtype=np.float32) * .1, 24000 + manifest = voice.generate(self.catalog, self.profile, self.root, synthesize=long_take) + target = self.root / 'runtime' + with self.assertRaisesRegex(ValueError, 'exceeds 2 seconds'): + prepare(manifest, self.catalog, self.profile, self.root, target) + self.assertFalse(target.exists()) + if __name__ == '__main__': unittest.main()