Skip to content

audio: --layer read mode for declared single-layer files (proposal) - #7321

Closed
jerrai-bot-heygen wants to merge 2 commits into
mainfrom
jerrai/cli-audio_read_layer-11062026
Closed

jerrai-bot-heygen wants to merge 2 commits into
mainfrom
jerrai/cli-audio_read_layer-11062026

Conversation

@jerrai-bot-heygen

Copy link
Copy Markdown
Contributor

This is a proposal from the Cut Room team, awaiting Rory's or Miguel's OK. It is a draft; we are not asking to merge it before they agree with the direction.

Why

Cut Room generates music takes. Each take is already a single layer, but hyperframes audio --read only builds its music reading from separated stems, so every new take pays for a stem separation (--quality best, billed through HeyGen). In one studied session that separation was 44% of media spend. Without it, music comes back null.

What

hyperframes audio <file> --read --layer music|sfx|voice declares the whole file to be one layer.

  • music: the file is read as its own stem through readMusic (segments, breaks, bpm, ambience). No separation runs. Voice and effects are not read (null), with the warning declared single-layer music: not separated, and the other layers are not read.
  • sfx: the file is the effects source for findEffects; no music, no voice.
  • voice: separation is skipped; voice lines come from the transcript if given, else from activity, as today's no-stems path does.
  • The header line says declared single-layer <layer>, and the JSON carries layer. The cache is keyed on the declared layer, so a file read with and without --layer never reuses the wrong entry.
  • Without --layer, behaviour is unchanged (the field is absent). --layer without --read, or with an unknown value, is a usage error.

Detection: hyperframes audio --help lists --layer; an older CLI rejects it as an unknown flag. The --read --json output includes "layer" on a layer read.

Tests

packages/cli/src/audio/read/read.test.ts: music take with --layer music yields music segments with zero stem calls, and the plain read of the same file is unchanged; voice and sfx read without separation. 15/15 pass locally; oxlint and oxfmt are clean.

Open question for the owners

Is whole-file sfx useful, or should we ship music only?

— Jerrai

@mintlify

mintlify Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated
hyperframes 🟢 Ready View Preview Nov 6, 2026, 3:08 PM

💡 Tip: Enable Automations to automatically generate PRs for you.

@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Fallow audit report

Quality gate failed

Found 1 finding.

Health (1)
Severity Rule Location Description
major fallow/high-cyclomatic-complexity packages/cli/src/audio/read/read.ts:462 'readAudio' has cyclomatic complexity 21 (threshold: 20)

Generated by fallow.

Gate outcomes: failed audit-verdict.

SanHsien added a commit to SanHsien/hyperframes that referenced this pull request Nov 6, 2026
…, record duplicate rule

Review PR heygen-com#7304-heygen-com#7335: 10 merged already adopted or deferred; 10 open or draft PRs
pinned (heygen-com#7304, heygen-com#7308, heygen-com#7311, heygen-com#7315, heygen-com#7321, heygen-com#7330-heygen-com#7334); open duplicates of
pinned heygen-com#7281/heygen-com#7285/heygen-com#7286/heygen-com#7296 are tracked by those pins. strict exit 0;
monitored 110 -> 120.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
@jerrai-bot-heygen

Copy link
Copy Markdown
Contributor Author

Superseded by #7345 (merged 2026-11-07 03:43Z), which ships the same audio --read --layer music|sfx|voice flag on main. Rory OK'd the direction (Slack C0BEH487Q7R ts 1794017350.834929). Closing this duplicate; branch kept. — Jerrai

This branch was successfully deployed

1 active deployment
staging - docs — 3fccf55f Deployed Nov 6, 2026 by mintlify[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant