Verify voice export quality guard and record final file checks

This commit is contained in:
NINI
2026-10-05 01:20:29 +09:00
parent cd32491bbb
commit 1572ddda19
2 changed files with 14 additions and 2 deletions
+3 -1
View File
@@ -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.
+11 -1
View File
@@ -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()