Expand narrated story, preserve solved patterns, and add ambience
Connect the island story with new character memories and narrative transitions. Blend each solved symbol into its artwork and retain a replayable pattern stamp. Allow completed grids to be inspected after navigation and app restarts. Reduce campaign difficulty spikes and keep explained story hints free. Append 24 narrated continuations while preserving original PCM takes. Add four offline environmental loops with saved mute/volume controls, scene fades, narration ducking and lifecycle handling. Validation: 31 unit/widget tests, Flutter analysis, narration and soundscape asset checks, tablet discovery layouts and extended-audio integration, including simultaneous active voice and ambience mixer tracks.
This commit is contained in:
@@ -14,13 +14,21 @@ assert {r['pageId'] for r in canonical}==set(manifest['tracks'])
|
||||
for record in canonical:
|
||||
if record['pageId'].startswith('campaign.'):
|
||||
_,index,phase=record['pageId'].split('.')
|
||||
assert record['text']==campaign[int(index)][phase], 'Campaign narration is stale'
|
||||
level=campaign[int(index)]
|
||||
expected='\n\n'.join(p for p in [level[phase],level.get(phase+'Continuation','')] if p)
|
||||
assert record['text']==expected, 'Campaign narration is stale'
|
||||
elif record.get('speaker')=='Narrator':
|
||||
page=pages[record['pageId']]
|
||||
expected=campaign[page['campaignIndex']][page['textSource']] if page.get('textSource') in ('before','after') else page['text']
|
||||
if page.get('textSource') in ('before','after'):
|
||||
level=campaign[page['campaignIndex']];phase=page['textSource']
|
||||
expected='\n\n'.join(p for p in [level[phase],page.get('continuation',level.get(phase+'Continuation',''))] if p)
|
||||
else:expected='\n\n'.join(p for p in [page['text'],page.get('continuation','')] if p)
|
||||
assert record['text']==expected, 'Notebook narration is stale'
|
||||
track=manifest['tracks'][record['pageId']]
|
||||
assert track['text']==record['text']
|
||||
if record.get('continuation'):
|
||||
assert record['text']==record['baseText']+'\n\n'+record['continuation']
|
||||
assert track['continuationSpeaker']=='Narrator'
|
||||
assert track['textSha256']==hashlib.sha256(record['text'].encode()).hexdigest()
|
||||
assert track['resource']==record['resource']
|
||||
if record.get('speaker')=='Narrator':
|
||||
@@ -39,6 +47,8 @@ for record in canonical:
|
||||
assert reader.getnchannels()==1 and reader.getsampwidth()==2 and reader.getframerate()==24000
|
||||
assert reader.getnframes()==track['frames']
|
||||
master=reader.readframes(reader.getnframes())
|
||||
if track.get('originalFrames'):
|
||||
assert hashlib.sha256(master[:track['originalFrames']*2]).hexdigest()==track['originalPcmSha256'],'Original take was changed'
|
||||
samples=array.array('h',master);peak=max(abs(v) for v in samples)
|
||||
assert 1000<peak<32767,'Silent or clipped audio'
|
||||
decoded=subprocess.check_output(['ffmpeg','-v','error','-i',str(flac),'-f','s16le','-acodec','pcm_s16le','-'])
|
||||
|
||||
Reference in New Issue
Block a user