You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
carries segments/words/duration a media blob can't hold
Segment-aware speech is still cached losslessly via the SDK's own resolveSpeech cache key (sdk/src/react/resolve.ts), which preserves the full CachedSpeechResult.
How it's enforced
extractMediaData returns null for anything shaped like CachedSpeechResult ({ file, duration, words?, segments? }) → not written to the media cache.
extractMediaData extracts { audio: {...} } payloads (music + plain generations) → written to the media cache.
reconstructCachedValue returns audio in the { audio: {...} } shape the SDK destructures (const { audio } = ...).
Policy
Audio is cached at the render layer (
render/src/api/render/cache-utils.ts), with one exception: segment-aware speech is not media-cached.generateMusic)await Speech({ children: [...] }))segments/words/durationa media blob can't holdSegment-aware speech is still cached losslessly via the SDK's own
resolveSpeechcache key (sdk/src/react/resolve.ts), which preserves the fullCachedSpeechResult.How it's enforced
extractMediaDatareturnsnullfor anything shaped likeCachedSpeechResult({ file, duration, words?, segments? }) → not written to the media cache.extractMediaDataextracts{ audio: {...} }payloads (music + plain generations) → written to the media cache.reconstructCachedValuereturns audio in the{ audio: {...} }shape the SDK destructures (const { audio } = ...).History (why this exists)
segments[0].duration.f2e7ee9) removed the{ audio }wrapper but left stale entries → crashedaudio.mediaType.{ audio }wrapper.Related: vargHQ/render#97, #219.
If you touch this
Never media-cache a value that has
segments/words/duration— it must round-trip through the SDKresolveSpeechcache instead.