Enhance postcard puzzles and narration
This commit is contained in:
@@ -29,6 +29,11 @@ if performance_path.exists():
|
||||
assert manifest.get('speakers') == cast, 'Stale voice design'
|
||||
assert manifest.get('model') == performance['model'], 'Wrong narration model'
|
||||
assert manifest.get('modelRevision') == performance['revision'], 'Wrong model revision'
|
||||
if manifest.get('voiceClone'):
|
||||
reference = package / 'narration/references/elias.wav'
|
||||
metadata = read(reference.with_suffix('.json'))
|
||||
assert sha(reference) == metadata['sha256'] == manifest['voiceClone']['referenceSha256']
|
||||
assert metadata['text'] == manifest['voiceClone']['referenceText']
|
||||
assert len({p['id'] for p in notebook}) == len(notebook), 'Duplicate page IDs'
|
||||
prose = {p['id'] for p in notebook if p['type'] != 'puzzle'}
|
||||
assert set(scripts) == prose == set(tracks), 'Every prose page must have exactly one recording'
|
||||
@@ -63,7 +68,20 @@ for page in notebook:
|
||||
if performance_path.exists():
|
||||
expected = ' '.join((cast[segment['speaker']]['designPrompt'],
|
||||
performance['delivery'], segment['direction']))
|
||||
assert cue['instruct'] == expected, 'Performance instruction was not rendered'
|
||||
synthesis = cue.get('synthesis')
|
||||
if manifest.get('voiceClone'):
|
||||
assert bool(synthesis) == (segment['speaker'] in ('Elias', 'The echo')), \
|
||||
'Every Elias and echo cue must use the shared reference'
|
||||
if synthesis:
|
||||
assert segment['speaker'] in ('Elias', 'The echo')
|
||||
assert synthesis['engine'] == 'qwen3-voice-clone'
|
||||
assert synthesis['model'] == manifest['voiceClone']['model']
|
||||
assert synthesis['revision'] == manifest['voiceClone']['revision']
|
||||
assert synthesis['referenceSha256'] == manifest['voiceClone']['referenceSha256']
|
||||
assert synthesis['seed'] == cue['seed']
|
||||
assert cue['instruct'] == '', 'Cloning did not use VoiceDesign instructions'
|
||||
else:
|
||||
assert cue['instruct'] == expected, 'Performance instruction was not rendered'
|
||||
assert track['engine'] == performance['engine']
|
||||
assert track['model'] == performance['model']
|
||||
assert track['modelRevision'] == performance['revision']
|
||||
|
||||
Reference in New Issue
Block a user