@allyhub/sdk 0.1.0-alpha.7 → 0.2.0-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE +85 -0
- package/client.d.ts +45 -1
- package/dist/anim.js +2 -75
- package/dist/define.d.ts +10 -4
- package/dist/define.js +2 -95
- package/dist/dom.d.ts +1 -1
- package/dist/dom.js +2 -457
- package/dist/fit.js +2 -60
- package/dist/free.d.ts +18 -0
- package/dist/free.js +2 -0
- package/dist/index.d.ts +28 -13
- package/dist/index.js +2 -11
- package/dist/input.d.ts +306 -0
- package/dist/input.js +2 -0
- package/dist/media.d.ts +3 -6
- package/dist/media.js +2 -27
- package/dist/messages.d.ts +3 -2
- package/dist/messages.js +2 -2
- package/dist/module.d.ts +24 -0
- package/dist/module.js +2 -0
- package/dist/noise.js +2 -233
- package/dist/parts.d.ts +97 -21
- package/dist/parts.js +2 -414
- package/dist/paths.d.ts +1 -1
- package/dist/paths.js +2 -720
- package/dist/phone.d.ts +26 -0
- package/dist/phone.js +2 -0
- package/dist/piece.d.ts +106 -35
- package/dist/piece.js +2 -38
- package/dist/props.d.ts +1 -1
- package/dist/props.js +2 -35
- package/dist/scenery.d.ts +2 -0
- package/dist/scenery.js +2 -0
- package/dist/text.js +2 -38
- package/dist/written.d.ts +12 -0
- package/dist/written.js +2 -0
- package/docs/README.md +18 -0
- package/docs/batches.md +148 -0
- package/docs/contract.md +51 -0
- package/docs/defaults.md +703 -0
- package/docs/docs.md +148 -0
- package/docs/footage.md +249 -0
- package/docs/layers.md +317 -0
- package/docs/modeling.md +143 -0
- package/docs/project.md +265 -0
- package/docs/scenery.md +308 -0
- package/docs/sheets.md +119 -0
- package/docs/slides.md +111 -0
- package/docs/sound.md +170 -0
- package/docs/speech.md +289 -0
- package/docs/video.md +265 -0
- package/node_modules/@allyhub-next/audio/dist/at-cut.d.ts +52 -0
- package/node_modules/@allyhub-next/audio/dist/at-cut.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/decode.d.ts +33 -0
- package/node_modules/@allyhub-next/audio/dist/decode.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/envelope.d.ts +37 -0
- package/node_modules/@allyhub-next/audio/dist/envelope.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/index.d.ts +17 -0
- package/node_modules/@allyhub-next/audio/dist/index.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/levels.d.ts +97 -0
- package/node_modules/@allyhub-next/audio/dist/levels.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/master.d.ts +29 -0
- package/node_modules/@allyhub-next/audio/dist/master.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/music.d.ts +11 -0
- package/node_modules/@allyhub-next/audio/dist/music.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/decode.d.ts +39 -0
- package/node_modules/@allyhub-next/audio/dist/node/decode.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/ebur128.d.ts +25 -0
- package/node_modules/@allyhub-next/audio/dist/node/ebur128.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.d.ts +31 -0
- package/node_modules/@allyhub-next/audio/dist/node/ffmpeg.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/index.d.ts +8 -0
- package/node_modules/@allyhub-next/audio/dist/node/index.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/loudness.d.ts +18 -0
- package/node_modules/@allyhub-next/audio/dist/node/loudness.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/master.d.ts +42 -0
- package/node_modules/@allyhub-next/audio/dist/node/master.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/measure.d.ts +60 -0
- package/node_modules/@allyhub-next/audio/dist/node/measure.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/node/mix.d.ts +31 -0
- package/node_modules/@allyhub-next/audio/dist/node/mix.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/plan.d.ts +143 -0
- package/node_modules/@allyhub-next/audio/dist/plan.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recorded.d.ts +26 -0
- package/node_modules/@allyhub-next/audio/dist/recorded.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.d.ts +47 -0
- package/node_modules/@allyhub-next/audio/dist/recording/bandwidth.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/chain.d.ts +89 -0
- package/node_modules/@allyhub-next/audio/dist/recording/chain.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/dynamics.d.ts +64 -0
- package/node_modules/@allyhub-next/audio/dist/recording/dynamics.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fft.d.ts +26 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fft.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/filters.d.ts +42 -0
- package/node_modules/@allyhub-next/audio/dist/recording/filters.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fit.d.ts +56 -0
- package/node_modules/@allyhub-next/audio/dist/recording/fit.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/index.d.ts +10 -0
- package/node_modules/@allyhub-next/audio/dist/recording/index.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/loudness.d.ts +12 -0
- package/node_modules/@allyhub-next/audio/dist/recording/loudness.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/measure.d.ts +67 -0
- package/node_modules/@allyhub-next/audio/dist/recording/measure.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/mic.d.ts +32 -0
- package/node_modules/@allyhub-next/audio/dist/recording/mic.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/noise.d.ts +27 -0
- package/node_modules/@allyhub-next/audio/dist/recording/noise.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/presets.d.ts +64 -0
- package/node_modules/@allyhub-next/audio/dist/recording/presets.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/room.d.ts +78 -0
- package/node_modules/@allyhub-next/audio/dist/recording/room.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/setup.d.ts +111 -0
- package/node_modules/@allyhub-next/audio/dist/recording/setup.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/recording/vec.d.ts +3 -0
- package/node_modules/@allyhub-next/audio/dist/recording/vec.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/render.d.ts +26 -0
- package/node_modules/@allyhub-next/audio/dist/render.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/sfx.d.ts +10 -0
- package/node_modules/@allyhub-next/audio/dist/sfx.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/shape.d.ts +118 -0
- package/node_modules/@allyhub-next/audio/dist/shape.js +2 -0
- package/node_modules/@allyhub-next/audio/dist/voice.d.ts +45 -0
- package/node_modules/@allyhub-next/audio/dist/voice.js +2 -0
- package/node_modules/@allyhub-next/audio/package.json +17 -0
- package/node_modules/@allyhub-next/formats/dist/data/comments.d.ts +94 -0
- package/node_modules/@allyhub-next/formats/dist/data/comments.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/config.d.ts +10 -0
- package/node_modules/@allyhub-next/formats/dist/data/config.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/edits.d.ts +28 -0
- package/node_modules/@allyhub-next/formats/dist/data/edits.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/elements.d.ts +6 -0
- package/node_modules/@allyhub-next/formats/dist/data/elements.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/faces.d.ts +38 -0
- package/node_modules/@allyhub-next/formats/dist/data/faces.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/file.d.ts +11 -0
- package/node_modules/@allyhub-next/formats/dist/data/file.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/gen.d.ts +31 -0
- package/node_modules/@allyhub-next/formats/dist/data/gen.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/messages.d.ts +34 -0
- package/node_modules/@allyhub-next/formats/dist/data/messages.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/reference.d.ts +676 -0
- package/node_modules/@allyhub-next/formats/dist/data/reference.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/script.d.ts +37 -0
- package/node_modules/@allyhub-next/formats/dist/data/script.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/sheet.d.ts +214 -0
- package/node_modules/@allyhub-next/formats/dist/data/sheet.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/data/words.d.ts +25 -0
- package/node_modules/@allyhub-next/formats/dist/data/words.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/index.d.ts +16 -0
- package/node_modules/@allyhub-next/formats/dist/index.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/items.d.ts +94 -0
- package/node_modules/@allyhub-next/formats/dist/items.js +2 -0
- package/node_modules/@allyhub-next/formats/dist/layout.d.ts +50 -0
- package/node_modules/@allyhub-next/formats/dist/layout.js +5 -0
- package/node_modules/@allyhub-next/formats/dist/schemas.d.ts +301 -0
- package/node_modules/@allyhub-next/formats/dist/schemas.js +2 -0
- package/node_modules/@allyhub-next/formats/package.json +14 -0
- package/node_modules/@allyhub-next/formats/schemas/comments.schema.json +152 -0
- package/node_modules/@allyhub-next/formats/schemas/config.schema.json +43 -0
- package/node_modules/@allyhub-next/formats/schemas/edits.schema.json +112 -0
- package/node_modules/@allyhub-next/formats/schemas/elements.schema.json +33 -0
- package/node_modules/@allyhub-next/formats/schemas/gen.schema.json +97 -0
- package/node_modules/@allyhub-next/formats/schemas/interpretation.schema.json +125 -0
- package/node_modules/@allyhub-next/formats/schemas/items.json +75 -0
- package/node_modules/@allyhub-next/formats/schemas/messages.schema.json +11 -0
- package/node_modules/@allyhub-next/formats/schemas/script.schema.json +162 -0
- package/node_modules/@allyhub-next/formats/schemas/sheet.schema.json +395 -0
- package/node_modules/@allyhub-next/formats/schemas/words.schema.json +63 -0
- package/node_modules/@allyhub-next/protocol/dist/app.d.ts +98 -0
- package/node_modules/@allyhub-next/protocol/dist/app.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/auth.d.ts +116 -0
- package/node_modules/@allyhub-next/protocol/dist/auth.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/cli.d.ts +59 -0
- package/node_modules/@allyhub-next/protocol/dist/cli.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/cloud.d.ts +272 -0
- package/node_modules/@allyhub-next/protocol/dist/cloud.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/editor.d.ts +405 -0
- package/node_modules/@allyhub-next/protocol/dist/editor.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/files.d.ts +101 -0
- package/node_modules/@allyhub-next/protocol/dist/files.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/index.d.ts +12 -0
- package/node_modules/@allyhub-next/protocol/dist/index.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/jsonrpc.d.ts +83 -0
- package/node_modules/@allyhub-next/protocol/dist/jsonrpc.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/registry.d.ts +53 -0
- package/node_modules/@allyhub-next/protocol/dist/registry.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/runtimes.d.ts +93 -0
- package/node_modules/@allyhub-next/protocol/dist/runtimes.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/teams.d.ts +67 -0
- package/node_modules/@allyhub-next/protocol/dist/teams.js +2 -0
- package/node_modules/@allyhub-next/protocol/dist/tools.d.ts +345 -0
- package/node_modules/@allyhub-next/protocol/dist/tools.js +2 -0
- package/node_modules/@allyhub-next/protocol/package.json +13 -0
- package/node_modules/@allyhub-next/runtimes/dist/bundled.d.ts +10 -0
- package/node_modules/@allyhub-next/runtimes/dist/bundled.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/download.d.ts +15 -0
- package/node_modules/@allyhub-next/runtimes/dist/download.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/errors.d.ts +16 -0
- package/node_modules/@allyhub-next/runtimes/dist/errors.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/home.d.ts +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/home.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/index.d.ts +9 -0
- package/node_modules/@allyhub-next/runtimes/dist/index.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/lock.d.ts +6 -0
- package/node_modules/@allyhub-next/runtimes/dist/lock.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/manifest.d.ts +3 -0
- package/node_modules/@allyhub-next/runtimes/dist/manifest.js +2 -0
- package/node_modules/@allyhub-next/runtimes/dist/runtimes.d.ts +63 -0
- package/node_modules/@allyhub-next/runtimes/dist/runtimes.js +3 -0
- package/node_modules/@allyhub-next/runtimes/dist/unpack.d.ts +7 -0
- package/node_modules/@allyhub-next/runtimes/dist/unpack.js +2 -0
- package/node_modules/@allyhub-next/runtimes/manifest.json +395 -0
- package/node_modules/@allyhub-next/runtimes/package.json +14 -0
- package/node_modules/@allyhub-next/runtimes/schemas/runtimes.schema.json +153 -0
- package/node_modules/@allyhub-next/scenery/NOTICE +42 -0
- package/node_modules/@allyhub-next/scenery/dist/aim.d.ts +55 -0
- package/node_modules/@allyhub-next/scenery/dist/aim.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/bake.d.ts +203 -0
- package/node_modules/@allyhub-next/scenery/dist/bake.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/camera.d.ts +150 -0
- package/node_modules/@allyhub-next/scenery/dist/camera.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/curve.d.ts +40 -0
- package/node_modules/@allyhub-next/scenery/dist/curve.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/define.d.ts +164 -0
- package/node_modules/@allyhub-next/scenery/dist/define.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/fit.d.ts +64 -0
- package/node_modules/@allyhub-next/scenery/dist/fit.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/glass.d.ts +34 -0
- package/node_modules/@allyhub-next/scenery/dist/glass.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/handheld.d.ts +184 -0
- package/node_modules/@allyhub-next/scenery/dist/handheld.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/hull.d.ts +23 -0
- package/node_modules/@allyhub-next/scenery/dist/hull.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/index.d.ts +22 -0
- package/node_modules/@allyhub-next/scenery/dist/index.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/lens.d.ts +48 -0
- package/node_modules/@allyhub-next/scenery/dist/lens.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/moire.d.ts +136 -0
- package/node_modules/@allyhub-next/scenery/dist/moire.js +93 -0
- package/node_modules/@allyhub-next/scenery/dist/motion.d.ts +48 -0
- package/node_modules/@allyhub-next/scenery/dist/motion.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/move.d.ts +260 -0
- package/node_modules/@allyhub-next/scenery/dist/move.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/noise.d.ts +41 -0
- package/node_modules/@allyhub-next/scenery/dist/noise.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/phone.d.ts +34 -0
- package/node_modules/@allyhub-next/scenery/dist/phone.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/report.d.ts +677 -0
- package/node_modules/@allyhub-next/scenery/dist/report.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/screen-focus.d.ts +55 -0
- package/node_modules/@allyhub-next/scenery/dist/screen-focus.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/screen.d.ts +71 -0
- package/node_modules/@allyhub-next/scenery/dist/screen.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/solve.d.ts +82 -0
- package/node_modules/@allyhub-next/scenery/dist/solve.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/timing.d.ts +26 -0
- package/node_modules/@allyhub-next/scenery/dist/timing.js +2 -0
- package/node_modules/@allyhub-next/scenery/dist/vec.d.ts +19 -0
- package/node_modules/@allyhub-next/scenery/dist/vec.js +2 -0
- package/node_modules/@allyhub-next/scenery/package.json +13 -0
- package/node_modules/@allyhub-next/video-core/dist/anchors.d.ts +164 -0
- package/node_modules/@allyhub-next/video-core/dist/anchors.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/audio-types.d.ts +148 -0
- package/node_modules/@allyhub-next/video-core/dist/audio-types.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/backdrop.d.ts +87 -0
- package/node_modules/@allyhub-next/video-core/dist/backdrop.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/captions.d.ts +122 -0
- package/node_modules/@allyhub-next/video-core/dist/captions.js +11 -0
- package/node_modules/@allyhub-next/video-core/dist/console.d.ts +91 -0
- package/node_modules/@allyhub-next/video-core/dist/console.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/contrast.d.ts +98 -0
- package/node_modules/@allyhub-next/video-core/dist/contrast.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/cut-report.d.ts +77 -0
- package/node_modules/@allyhub-next/video-core/dist/cut-report.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/edit.d.ts +77 -0
- package/node_modules/@allyhub-next/video-core/dist/edit.js +13 -0
- package/node_modules/@allyhub-next/video-core/dist/edits.d.ts +163 -0
- package/node_modules/@allyhub-next/video-core/dist/edits.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/export.d.ts +96 -0
- package/node_modules/@allyhub-next/video-core/dist/export.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/fact.d.ts +965 -0
- package/node_modules/@allyhub-next/video-core/dist/fact.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/footage-motion.d.ts +168 -0
- package/node_modules/@allyhub-next/video-core/dist/footage-motion.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/formats.d.ts +240 -0
- package/node_modules/@allyhub-next/video-core/dist/formats.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/gen.d.ts +37 -0
- package/node_modules/@allyhub-next/video-core/dist/gen.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/index.d.ts +40 -0
- package/node_modules/@allyhub-next/video-core/dist/index.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/look.d.ts +66 -0
- package/node_modules/@allyhub-next/video-core/dist/look.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/marks.d.ts +34 -0
- package/node_modules/@allyhub-next/video-core/dist/marks.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/matrix.d.ts +289 -0
- package/node_modules/@allyhub-next/video-core/dist/matrix.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/measure.d.ts +465 -0
- package/node_modules/@allyhub-next/video-core/dist/measure.js +5 -0
- package/node_modules/@allyhub-next/video-core/dist/media.d.ts +226 -0
- package/node_modules/@allyhub-next/video-core/dist/media.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/messages.d.ts +88 -0
- package/node_modules/@allyhub-next/video-core/dist/messages.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/motion.d.ts +56 -0
- package/node_modules/@allyhub-next/video-core/dist/motion.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/music.d.ts +110 -0
- package/node_modules/@allyhub-next/video-core/dist/music.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/piece.d.ts +1146 -0
- package/node_modules/@allyhub-next/video-core/dist/piece.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/placement.d.ts +37 -0
- package/node_modules/@allyhub-next/video-core/dist/placement.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/problem.d.ts +262 -0
- package/node_modules/@allyhub-next/video-core/dist/problem.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/render-types.d.ts +49 -0
- package/node_modules/@allyhub-next/video-core/dist/render-types.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/schema.d.ts +352 -0
- package/node_modules/@allyhub-next/video-core/dist/schema.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/script-edit.d.ts +176 -0
- package/node_modules/@allyhub-next/video-core/dist/script-edit.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/script.d.ts +67 -0
- package/node_modules/@allyhub-next/video-core/dist/script.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/seams.d.ts +214 -0
- package/node_modules/@allyhub-next/video-core/dist/seams.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/slides.d.ts +37 -0
- package/node_modules/@allyhub-next/video-core/dist/slides.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/sound-under.d.ts +72 -0
- package/node_modules/@allyhub-next/video-core/dist/sound-under.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/speech.d.ts +83 -0
- package/node_modules/@allyhub-next/video-core/dist/speech.js +5 -0
- package/node_modules/@allyhub-next/video-core/dist/timeline.d.ts +616 -0
- package/node_modules/@allyhub-next/video-core/dist/timeline.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/timing.d.ts +88 -0
- package/node_modules/@allyhub-next/video-core/dist/timing.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/transcript.d.ts +288 -0
- package/node_modules/@allyhub-next/video-core/dist/transcript.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/transition.d.ts +289 -0
- package/node_modules/@allyhub-next/video-core/dist/transition.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/voice.d.ts +175 -0
- package/node_modules/@allyhub-next/video-core/dist/voice.js +2 -0
- package/node_modules/@allyhub-next/video-core/dist/words.d.ts +128 -0
- package/node_modules/@allyhub-next/video-core/dist/words.js +2 -0
- package/node_modules/@allyhub-next/video-core/package.json +14 -0
- package/package.json +52 -41
- package/README.md +0 -17
- package/dist/anim.d.ts.map +0 -1
- package/dist/anim.js.map +0 -1
- package/dist/define.d.ts.map +0 -1
- package/dist/define.js.map +0 -1
- package/dist/dom.d.ts.map +0 -1
- package/dist/dom.js.map +0 -1
- package/dist/fit.d.ts.map +0 -1
- package/dist/fit.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/media.d.ts.map +0 -1
- package/dist/media.js.map +0 -1
- package/dist/messages.d.ts.map +0 -1
- package/dist/messages.js.map +0 -1
- package/dist/noise.d.ts.map +0 -1
- package/dist/noise.js.map +0 -1
- package/dist/parts.d.ts.map +0 -1
- package/dist/parts.js.map +0 -1
- package/dist/paths.d.ts.map +0 -1
- package/dist/paths.js.map +0 -1
- package/dist/piece.d.ts.map +0 -1
- package/dist/piece.js.map +0 -1
- package/dist/props.d.ts.map +0 -1
- package/dist/props.js.map +0 -1
- package/dist/text.d.ts.map +0 -1
- package/dist/text.js.map +0 -1
- /package/{LICENSE → LICENSE.md} +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type LineAnchor } from "./anchors.js";
|
|
2
|
+
import { type Problem } from "./problem.js";
|
|
3
|
+
import type { Word } from "./media.js";
|
|
4
|
+
export interface PartInput {
|
|
5
|
+
key: string;
|
|
6
|
+
/** The part's words on its speech's clock (seconds from the start of its speech). */
|
|
7
|
+
words?: readonly Word[];
|
|
8
|
+
/** Seconds of speech audio. With it the part is voiced. */
|
|
9
|
+
speechDur?: number;
|
|
10
|
+
/**
|
|
11
|
+
* The line the part says, as spoken, when the script is known (say,
|
|
12
|
+
* saying): word references are looked up in it and mapped to the words,
|
|
13
|
+
* so a misheard word still lands where it is said.
|
|
14
|
+
*/
|
|
15
|
+
script?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The anchors of that line (its script's @{name}), by the letters and
|
|
18
|
+
* digits before each: what "@name" and "@/name" refer to.
|
|
19
|
+
*/
|
|
20
|
+
anchors?: readonly LineAnchor[];
|
|
21
|
+
/**
|
|
22
|
+
* The part's own anchors (`part({ anchors })`), in seconds from its
|
|
23
|
+
* start: "@name" and "@/name" refer to them too, speech or none.
|
|
24
|
+
*/
|
|
25
|
+
placed?: readonly PlacedAnchor[];
|
|
26
|
+
/** Seconds, for a part without speech. */
|
|
27
|
+
dur: number;
|
|
28
|
+
/**
|
|
29
|
+
* The part has speech that could not be found (its own problem is
|
|
30
|
+
* reported): word references are estimated from where they sit in the
|
|
31
|
+
* script, without another problem.
|
|
32
|
+
*/
|
|
33
|
+
pending?: boolean;
|
|
34
|
+
lead: number;
|
|
35
|
+
tail: number;
|
|
36
|
+
/**
|
|
37
|
+
* J and L cuts (voiced parts): seconds of the speech played under the
|
|
38
|
+
* previous part's picture (`before`) and under the next one's (`after`).
|
|
39
|
+
*/
|
|
40
|
+
before?: number;
|
|
41
|
+
after?: number;
|
|
42
|
+
}
|
|
43
|
+
/** An anchor a part places itself: a point, or a stretch to `end`, in seconds from its start. */
|
|
44
|
+
export interface PlacedAnchor {
|
|
45
|
+
name: string;
|
|
46
|
+
at: number;
|
|
47
|
+
end?: number;
|
|
48
|
+
}
|
|
49
|
+
export interface TimingOptions {
|
|
50
|
+
fps?: number;
|
|
51
|
+
/** Seconds per beat; parts without speech end on the beat grid. */
|
|
52
|
+
beat?: number;
|
|
53
|
+
/** Film seconds of one beat of the grid; default 0. */
|
|
54
|
+
beatPhase?: number;
|
|
55
|
+
/**
|
|
56
|
+
* Where a part without speech ends instead of the grid: the beat nearest
|
|
57
|
+
* `t` that is after `after` (the music's beats on the film, which its
|
|
58
|
+
* stretches and loops move); undefined leaves the part as long as it is.
|
|
59
|
+
*/
|
|
60
|
+
snap?: (t: number, after: number) => number | undefined;
|
|
61
|
+
}
|
|
62
|
+
export interface TimedPart {
|
|
63
|
+
key: string;
|
|
64
|
+
start: number;
|
|
65
|
+
end: number;
|
|
66
|
+
/**
|
|
67
|
+
* Film time where the part's speech starts (voiced parts only); before
|
|
68
|
+
* `start` in a J cut.
|
|
69
|
+
*/
|
|
70
|
+
speechAt?: number;
|
|
71
|
+
}
|
|
72
|
+
export interface Timing {
|
|
73
|
+
parts: TimedPart[];
|
|
74
|
+
duration: number;
|
|
75
|
+
problems: Problem[];
|
|
76
|
+
/** Seconds from part n's start of a word reference; problems go to `problems`. */
|
|
77
|
+
at(n: number, ref: unknown): number;
|
|
78
|
+
/** Part n's words on its own clock (seconds from the part's start). */
|
|
79
|
+
words(n: number): Word[];
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* A voiced part's J or L overlap: never negative, and at most its lead
|
|
83
|
+
* (or tail) and half its speech, so its picture keeps some of its own
|
|
84
|
+
* speech.
|
|
85
|
+
*/
|
|
86
|
+
export declare function overlapOf(p: PartInput, side: "before" | "after"): number;
|
|
87
|
+
export declare function timeParts(given: readonly PartInput[], opts?: TimingOptions): Timing;
|
|
88
|
+
//# sourceMappingURL=timing.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{parseAnchorRef as z}from"./anchors.js";import{FPS as B}from"./formats.js";import{problem as R}from"./problem.js";import{joinWords as E,normText as W,numericRef as H,parseWordRef as I,ScriptAlignment as J,WordStream as j}from"./words.js";const g=i=>Math.round(i*1e3)/1e3;function L(i,l,a){const x=w=>Math.round(w*a)/a,p=i.map(x);for(let w=1;w<p.length;w++){const d=p[w-1]??0;(p[w]??0)<=d&&(p[w]=d+1/a)}const b=p.at(-1)??0;return{starts:p,end:Math.max(x(l),b+1/a)}}const F=i=>i.speechDur!==void 0&&i.speechDur>0;export function overlapOf(i,l){const a=i[l]??0;if(!F(i)||!Number.isFinite(a)||a<=0)return 0;const x=(i.speechDur??0)/2+(l==="before"?i.lead:i.tail);return Math.min(a,x)}export function timeParts(i,l={}){const a=i.map((t,e)=>({...t,before:e===0?0:t.before??0,after:e===i.length-1?0:t.after??0})),x=l.fps??B,p=l.beat??0,b=[];for(const t of a){const e=new Set((t.placed??[]).map(n=>n.name));for(const n of t.anchors??[])e.has(n.name)&&b.push(R("AK-T004",`The anchor ${n.name} of part ${t.key} is both in the line it says (@{${n.name}}) and in the part's own anchors; "@${n.name}" is the part's own. Rename one of them.`,{part:t.key}))}const w=[];let d=0;for(const t of a){w.push(d);let e;if(F(t))e=t.lead+(t.speechDur??0)+t.tail-overlapOf(t,"before")-overlapOf(t,"after");else{e=t.dur;const n=l.snap?.(d+e,d);if(n!==void 0)e=n-d;else if(p>0&&!l.snap){const r=l.beatPhase??0;let s=r+Math.round((d+e-r)/p)*p;s<=d+1e-9&&(s+=p),e=s-d}}d+=Math.max(e,1/x)}const{starts:G,end:K}=L(w,d,x),T=a.map((t,e)=>{const n=G[e]??0;return{key:t.key,start:n,end:G[e+1]??K,...F(t)?{speechAt:g(n+t.lead-overlapOf(t,"before"))}:{}}}),D=new Map,P=t=>{if(D.has(t))return D.get(t);const e=a[t],n=e?.script&&e.words?.length?new J(new j(e.words),[e.script]):void 0;return D.set(t,n),n};function C(t,e){const n=T[t],r=a[t];if(!n||!r)return;const s=r.anchors??[],f=r.placed??[],o=z(e,new Set([...s,...f].map(u=>u.name)));if(!o)return;const $=n.end-n.start,y=u=>(b.push(R("AK-T004",u,{part:r.key})),g($/2)),k=u=>g(Math.min($,Math.max(0,u))),m=f.find(u=>u.name===o.name);if(m)return o.end&&m.end===void 0?y(`"${e}" asks for the end of the anchor ${m.name} of part ${r.key}, which is a point. Give it as a stretch (anchors: { ${m.name}: [from, to] }), or use "@${m.name}".`):k((o.end?m.end??m.at:m.at)+o.shift);const c=s.find(u=>u.name===o.name);if(!c){const u=[...s,...f].map(q=>`@${q.name}`);return y(`The anchor "${e}" is not in the line part ${r.key} says, nor in the part's own anchors${u.length>0?` (its anchors: ${u.join(", ")})`:""}. Write @{${o.name}} before the word it is for, in the part's say in the item's script, in every language (the part must say that line, s("….say")); or give its seconds in the part: anchors: { ${o.name}: 1.2 }.`)}if(o.end&&c.end===void 0)return y(`"${e}" asks for the end of the anchor ${c.name} of part ${r.key}, which is a point. Write @{${c.name}}…@{/${c.name}} around the words in the script, or use "@${c.name}".`);const M=o.end?c.end??c.at:c.at,S=W(r.script??"");if(r.pending===!0&&n.speechAt===void 0)return S.length===0?g($/2):k(M/S.length*$+o.shift);const h=r.words??[],A=P(t);if(n.speechAt===void 0||!A||h.length===0)return y(`The anchor "${e}" is in part ${r.key}, which has no speech. Give its seconds in the part instead: anchors: { ${o.name}: 1.2 }.`);const v=h.at(-1),U=o.end?h[A.wordAtChar(0,Math.max(0,M-1))]?.end:M>=S.length?v?.end:h[A.wordAtChar(0,M)]?.start;return k(n.speechAt+(U??0)+o.shift-n.start)}function O(t,e){const n=H(e);if(n!==void 0)return n;const r=typeof e=="string"?C(t,e):void 0;if(r!==void 0)return r;const s=T[t],f=a[t];if(!s||!f)return 0;const o=s.end-s.start,$=f.words??[],{text:y,nth:k,shift:m}=I(String(e));let c=-1;$.length>0&&(c=P(t)?.wordFor(0,y,k)??-1,c<0&&(c=new j($).find(W(y),0,$.length-1,k)));const M=$[c];if(f.pending===!0&&s.speechAt===void 0){const h=W(f.script??"");let A=-1;for(let v=0;v<k;v++)A=h.indexOf(W(y),A+1);return A<0||h.length===0?g(o/2):g(Math.min(o,Math.max(0,A/h.length*o+m)))}if(c<0||!M||s.speechAt===void 0){const h=f.script??E($);return b.push(R("AK-T004",s.speechAt===void 0?`The word reference "${String(e)}" is in part ${f.key}, which has no speech. Give it in seconds from the part's start instead.`:`The word reference "${String(e)}" is not in the words of part ${f.key}${h?` (it says: "${h.length>160?`${h.slice(0,160)}…`:h}")`:""}. Use a word the part says, as "word", "word@2" or "word+0.2".`,{part:f.key})),g(o/2)}const S=s.speechAt+M.start+m;return g(Math.min(o,Math.max(0,S-s.start)))}function N(t){const e=T[t],n=a[t];if(!e||!n||e.speechAt===void 0)return[];const r=e.speechAt-e.start;return(n.words??[]).map(s=>({text:s.text,start:g(s.start+r),end:g(s.end+r)}))}return{parts:T,duration:K,problems:b,at:O,words:N}}
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import type { EditedSpeech } from "./edits.js";
|
|
2
|
+
import type { Word } from "./media.js";
|
|
3
|
+
import { type UnheardSound, type VoiceFrames } from "./voice.js";
|
|
4
|
+
/** A take's noise floor and speech level, dBFS (FilmCraft's percentiles). */
|
|
5
|
+
export interface TakeLevels {
|
|
6
|
+
/** The 10th percentile of frame levels above −100 dBFS. */
|
|
7
|
+
floor: number;
|
|
8
|
+
/** The 95th percentile. */
|
|
9
|
+
speech: number;
|
|
10
|
+
/** Speech or silence: 30 % of the way from floor to speech, at least 6 dB above the floor. */
|
|
11
|
+
threshold: number;
|
|
12
|
+
}
|
|
13
|
+
export declare function takeLevels(frames: Pick<VoiceFrames, "db">): TakeLevels;
|
|
14
|
+
/** A word's level: its loudest and its mean frame, dBFS. */
|
|
15
|
+
export interface WordLevel {
|
|
16
|
+
peak: number;
|
|
17
|
+
mean: number;
|
|
18
|
+
}
|
|
19
|
+
export declare function wordLevels(words: readonly Word[], frames: Pick<VoiceFrames, "db" | "hop">): WordLevel[];
|
|
20
|
+
/**
|
|
21
|
+
* Word bounds moved inward past frames quieter than the take's speech
|
|
22
|
+
* threshold (takeLevels), so the silence a recognizer puts inside a word
|
|
23
|
+
* goes back between words; a word keeps at least 60 ms, and a word with no
|
|
24
|
+
* frame above the threshold is left alone (FilmCraft's tighten_words).
|
|
25
|
+
* Returns new words and how many moved.
|
|
26
|
+
*/
|
|
27
|
+
export declare function tightenWords(words: readonly Word[], frames: Pick<VoiceFrames, "db" | "hop">): {
|
|
28
|
+
words: Word[];
|
|
29
|
+
moved: number;
|
|
30
|
+
};
|
|
31
|
+
/** What a word's length is compared with: a line through the take's own words. */
|
|
32
|
+
export interface SpeakingRate {
|
|
33
|
+
/** Seconds a word takes whatever its length. */
|
|
34
|
+
base: number;
|
|
35
|
+
/** Seconds more for each letter. */
|
|
36
|
+
perLetter: number;
|
|
37
|
+
/** Words the line was fitted through. */
|
|
38
|
+
words: number;
|
|
39
|
+
}
|
|
40
|
+
/** What the measurement inside words uses. */
|
|
41
|
+
export interface WordShapeOptions {
|
|
42
|
+
/** A frame counts as voiced from this voicing, 0 to 1. */
|
|
43
|
+
voiced: number;
|
|
44
|
+
/** A dip is a stretch of frames at least this many dB under the loudest frame on each side of it, inside the word. */
|
|
45
|
+
dip: number;
|
|
46
|
+
}
|
|
47
|
+
export declare const WORD_SHAPE_DEFAULTS: Readonly<WordShapeOptions>;
|
|
48
|
+
/** A word's length against the take's rate, and the sound inside it. */
|
|
49
|
+
export interface WordShape {
|
|
50
|
+
/** The word's index in the take's words. */
|
|
51
|
+
i: number;
|
|
52
|
+
/** Seconds it lasts. */
|
|
53
|
+
dur: number;
|
|
54
|
+
/** The letters its text has (0 for a word written in digits: no length follows from them). */
|
|
55
|
+
letters: number;
|
|
56
|
+
/** Seconds a word of this many letters takes by the take's rate; null without a rate or without letters. */
|
|
57
|
+
expected: number | null;
|
|
58
|
+
/** `dur` over `expected`. */
|
|
59
|
+
ratio: number | null;
|
|
60
|
+
/** `dur` minus `expected`, seconds. */
|
|
61
|
+
excess: number | null;
|
|
62
|
+
/** The stretches of voiced frames inside it, seconds of the file. */
|
|
63
|
+
voicedRuns: {
|
|
64
|
+
start: number;
|
|
65
|
+
end: number;
|
|
66
|
+
}[];
|
|
67
|
+
/** The dips in level inside it, seconds of the file, and how deep each goes, dB. */
|
|
68
|
+
dips: {
|
|
69
|
+
start: number;
|
|
70
|
+
end: number;
|
|
71
|
+
depth: number;
|
|
72
|
+
}[];
|
|
73
|
+
}
|
|
74
|
+
export interface WordShapes {
|
|
75
|
+
/** The take's rate; null when it has too few words to tell (`rateWhy`). */
|
|
76
|
+
rate: SpeakingRate | null;
|
|
77
|
+
rateWhy?: string;
|
|
78
|
+
options: WordShapeOptions;
|
|
79
|
+
/** One per word, in order. */
|
|
80
|
+
words: WordShape[];
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* The take's speaking rate: a line through the median length of its words
|
|
84
|
+
* of each letter count (the medians keep drawn-out words from bending it),
|
|
85
|
+
* weighted by how many words have that count. Undefined with fewer than
|
|
86
|
+
* eight words with letters, or when longer words do not last longer.
|
|
87
|
+
*/
|
|
88
|
+
export declare function speakingRate(words: readonly Word[]): SpeakingRate | undefined;
|
|
89
|
+
/**
|
|
90
|
+
* Every word measured from inside: how long it lasts against what its
|
|
91
|
+
* letters take at the take's own rate, the stretches of voiced frames in
|
|
92
|
+
* it and the dips in level between louder frames. Nothing is judged: a
|
|
93
|
+
* word far over its expected length with two voiced stretches may hold a
|
|
94
|
+
* filler run into it, or be a word said slowly.
|
|
95
|
+
*/
|
|
96
|
+
export declare function wordShapes(words: readonly Word[], frames: VoiceFrames, opts?: Partial<WordShapeOptions>): WordShapes;
|
|
97
|
+
/** Which words the transcript marks as long. */
|
|
98
|
+
export interface LongWordOptions {
|
|
99
|
+
/** A word is listed when it lasts at least this many times its expected length… */
|
|
100
|
+
ratio: number;
|
|
101
|
+
/** …and at least this many seconds more than it. */
|
|
102
|
+
excess: number;
|
|
103
|
+
}
|
|
104
|
+
export declare const LONG_WORD_DEFAULTS: Readonly<LongWordOptions>;
|
|
105
|
+
/** The words at least `ratio` times and `excess` seconds over their expected length. Candidates, never cuts. */
|
|
106
|
+
export declare function longWords(shapes: readonly WordShape[], opts?: Partial<LongWordOptions>): WordShape[];
|
|
107
|
+
/** A long word as the transcript marks it: `(long 0.62s ×2.4)`. */
|
|
108
|
+
export declare function longLabel(s: WordShape): string;
|
|
109
|
+
/** Words [from, to] said without a pause as long as the paragraph gap. */
|
|
110
|
+
export interface Paragraph {
|
|
111
|
+
from: number;
|
|
112
|
+
to: number;
|
|
113
|
+
start: number;
|
|
114
|
+
end: number;
|
|
115
|
+
text: string;
|
|
116
|
+
}
|
|
117
|
+
/** A paragraph of a take ends at a pause this long, seconds. */
|
|
118
|
+
export declare const PARAGRAPH_GAP = 0.5;
|
|
119
|
+
/** The take's words in paragraphs: a new one after a gap of `gap` seconds or more. */
|
|
120
|
+
export declare function paragraphs(words: readonly Word[], gap?: number, first?: number, last?: number): Paragraph[];
|
|
121
|
+
/** Where a phrase is said: words [from, to] and their times. */
|
|
122
|
+
export interface WordMatch {
|
|
123
|
+
from: number;
|
|
124
|
+
to: number;
|
|
125
|
+
start: number;
|
|
126
|
+
end: number;
|
|
127
|
+
text: string;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Every place the take says `phrase`: case and punctuation ignored, word
|
|
131
|
+
* by word, the last word of the phrase may be the start of a word
|
|
132
|
+
* ("manag" finds "manager").
|
|
133
|
+
*/
|
|
134
|
+
export declare function searchWords(words: readonly Word[], phrase: string): WordMatch[];
|
|
135
|
+
/**
|
|
136
|
+
* Where the take says any of `phrases` (the agent's list: "um", "you
|
|
137
|
+
* know"), whole words, longer phrases first, never overlapping. A
|
|
138
|
+
* candidate list: nothing is removed.
|
|
139
|
+
*/
|
|
140
|
+
export declare function phraseMatches(words: readonly Word[], phrases: readonly string[]): (WordMatch & {
|
|
141
|
+
phrase: string;
|
|
142
|
+
})[];
|
|
143
|
+
/** A pause between two words, and the stretch `keep` seconds of air would remove. */
|
|
144
|
+
export interface PauseCandidate {
|
|
145
|
+
/** The word before it. */
|
|
146
|
+
after: number;
|
|
147
|
+
start: number;
|
|
148
|
+
end: number;
|
|
149
|
+
gap: number;
|
|
150
|
+
/** What `maxPause: keep` cuts: the middle of the pause. */
|
|
151
|
+
remove: {
|
|
152
|
+
from: number;
|
|
153
|
+
to: number;
|
|
154
|
+
seconds: number;
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
/** Pauses of `min` seconds or more between words [first, last]. A candidate list. */
|
|
158
|
+
export declare function pauseCandidates(words: readonly Word[], min: number, keep: number, first?: number, last?: number): PauseCandidate[];
|
|
159
|
+
/** One side of a join: the kept word nearest the cut, and the sound between them. */
|
|
160
|
+
export interface JoinSide {
|
|
161
|
+
/** The kept word's index in the take's words. */
|
|
162
|
+
i: number;
|
|
163
|
+
text: string;
|
|
164
|
+
/**
|
|
165
|
+
* The word's end (before the cut) or start (after it), seconds of the
|
|
166
|
+
* file; the cut itself when it is inside the word.
|
|
167
|
+
*/
|
|
168
|
+
edge: number;
|
|
169
|
+
/** Seconds of the take kept between the word and the cut, by the word times (0 for a cut inside the word). */
|
|
170
|
+
gap: number;
|
|
171
|
+
/**
|
|
172
|
+
* Seconds of 10 ms frames under the quiet level reaching the cut on this
|
|
173
|
+
* side, inside the kept stretch: the silence the level shows, which may
|
|
174
|
+
* differ from `gap` when a word's bound is loose. null without levels.
|
|
175
|
+
*/
|
|
176
|
+
quiet: number | null;
|
|
177
|
+
/** The loudest frame between the word and the cut, dBFS; null without levels or with no frame between. */
|
|
178
|
+
peakBetween: number | null;
|
|
179
|
+
/** The word's loudest and mean frame, dBFS; null without levels. */
|
|
180
|
+
peak: number | null;
|
|
181
|
+
mean: number | null;
|
|
182
|
+
/** The mean level of the word's `near` seconds next to the cut (its end before it, its start after it), dBFS; null without levels. */
|
|
183
|
+
near: number | null;
|
|
184
|
+
}
|
|
185
|
+
/** Seconds of a word next to a cut whose level `Join.step` compares, when not given. */
|
|
186
|
+
export declare const JOIN_NEAR = 0.2;
|
|
187
|
+
/** Where a cut take jumps from one kept stretch to the next, measured on both sides. */
|
|
188
|
+
export interface Join {
|
|
189
|
+
/** Seconds of the edited take: where the join plays. */
|
|
190
|
+
at: number;
|
|
191
|
+
/** Seconds of the file where the stretch before ends, and where the next one starts. */
|
|
192
|
+
out: number;
|
|
193
|
+
in: number;
|
|
194
|
+
/** The words removed between the two kept words, if any (else a pause shortened or a sound cut). */
|
|
195
|
+
removed: {
|
|
196
|
+
from: number;
|
|
197
|
+
to: number;
|
|
198
|
+
} | null;
|
|
199
|
+
/** The cut is inside a kept word on a side (an edits file's `inWord`): no silence there by the word times. */
|
|
200
|
+
inWord: boolean;
|
|
201
|
+
before: JoinSide;
|
|
202
|
+
after: JoinSide;
|
|
203
|
+
/** `after.near` minus `before.near`, dB: the level step across the join; null without levels. */
|
|
204
|
+
step: number | null;
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Every join of a cut take, measured: on each side, how much of the take
|
|
208
|
+
* lies between the kept word and the cut (by word times, and as frames
|
|
209
|
+
* quieter than `quietDb` by the level), the two words' levels, and the
|
|
210
|
+
* step between the `near` seconds of each word next to the cut.
|
|
211
|
+
* Numbers only: whether a join sounds natural is the agent's call.
|
|
212
|
+
*/
|
|
213
|
+
export declare function joinsOf(words: readonly Word[], edited: Pick<EditedSpeech, "ranges" | "kept">, frames: Pick<VoiceFrames, "db" | "hop"> | undefined, quietDb: number, near?: number): Join[];
|
|
214
|
+
/** What counts as scripted, and as a line said. */
|
|
215
|
+
export interface ScriptDiffOptions {
|
|
216
|
+
/** A word counts as scripted when this share of its letters matched the script exactly (0–1). */
|
|
217
|
+
match: number;
|
|
218
|
+
/** A script line counts as said at a place when this share of its letters matched there (0–1). */
|
|
219
|
+
lineMatch: number;
|
|
220
|
+
}
|
|
221
|
+
export declare const SCRIPT_DIFF_DEFAULTS: Readonly<ScriptDiffOptions>;
|
|
222
|
+
/** A script line, measured against the take. */
|
|
223
|
+
export interface ScriptLine {
|
|
224
|
+
/** Its index among the script's non-empty lines. */
|
|
225
|
+
line: number;
|
|
226
|
+
text: string;
|
|
227
|
+
/** The share of its letters the take matched exactly, aligned with the whole script (0–1). */
|
|
228
|
+
share: number;
|
|
229
|
+
/** Each place the take says it (at least `lineMatch` of its letters there). */
|
|
230
|
+
matches: WordMatch[];
|
|
231
|
+
}
|
|
232
|
+
/** How a take differs from the script it was read from. Data, not decisions. */
|
|
233
|
+
export interface ScriptDiff {
|
|
234
|
+
/** The thresholds used. */
|
|
235
|
+
options: ScriptDiffOptions;
|
|
236
|
+
/** Stretches of words with less than `match` of their letters matched (ad-libs, fillers, false starts). */
|
|
237
|
+
unscripted: WordMatch[];
|
|
238
|
+
/** Script lines the take says more than once, each place it says them. */
|
|
239
|
+
repeated: {
|
|
240
|
+
line: number;
|
|
241
|
+
text: string;
|
|
242
|
+
matches: WordMatch[];
|
|
243
|
+
}[];
|
|
244
|
+
/** Every script line with its match share and the places it is said. */
|
|
245
|
+
lines: ScriptLine[];
|
|
246
|
+
}
|
|
247
|
+
export declare function scriptDiff(words: readonly Word[], lines: readonly string[], opts?: Partial<ScriptDiffOptions>): ScriptDiff;
|
|
248
|
+
/** What the packed transcript marks. */
|
|
249
|
+
export interface PackOptions {
|
|
250
|
+
/** A new line after a pause this long, seconds (default PARAGRAPH_GAP). */
|
|
251
|
+
gap?: number;
|
|
252
|
+
/** A paragraph goes on to a new line at the first sentence end after this many words (default 12). */
|
|
253
|
+
lineWords?: number;
|
|
254
|
+
/** Only words [from, to]. */
|
|
255
|
+
from?: number;
|
|
256
|
+
to?: number;
|
|
257
|
+
/** Sounds heard between words, shown where they are. */
|
|
258
|
+
sounds?: readonly UnheardSound[];
|
|
259
|
+
/** Word indices an edits file removes: shown struck, [-like this-]. */
|
|
260
|
+
removed?: ReadonlySet<number>;
|
|
261
|
+
/** Sound stretches an edits file removes. */
|
|
262
|
+
removedSounds?: readonly {
|
|
263
|
+
from: number;
|
|
264
|
+
to: number;
|
|
265
|
+
}[];
|
|
266
|
+
/** Stretches an edits file cuts inside kept words: shown after the word, `(cut 61.31–61.62 in word)`. */
|
|
267
|
+
inWord?: readonly {
|
|
268
|
+
from: number;
|
|
269
|
+
to: number;
|
|
270
|
+
}[];
|
|
271
|
+
/** Words to mark as long, by index: shown after the word, `(long 0.62s ×2.4)`. */
|
|
272
|
+
long?: ReadonlyMap<number, WordShape>;
|
|
273
|
+
/** Words no script matched: shown {like this}. */
|
|
274
|
+
unscripted?: ReadonlySet<number>;
|
|
275
|
+
}
|
|
276
|
+
/** A line of the packed transcript ends at the first sentence end after this many words. */
|
|
277
|
+
export declare const LINE_WORDS = 12;
|
|
278
|
+
/** A sound as the transcript shows it: `(sound 61.17–61.40 0.23s −9dB v0.87)`. */
|
|
279
|
+
export declare function soundLabel(s: UnheardSound, removed?: boolean): string;
|
|
280
|
+
/**
|
|
281
|
+
* The take as lines an agent plans cuts from: one per paragraph,
|
|
282
|
+
* `[012.40-015.10] #57-#71 text…`, word indices where they matter, the
|
|
283
|
+
* sounds between words inline with their stretch, level against speech
|
|
284
|
+
* and voicing; after a word, that it is long for the take's rate, and a
|
|
285
|
+
* stretch an edits file cuts inside it.
|
|
286
|
+
*/
|
|
287
|
+
export declare function packTranscript(words: readonly Word[], opts?: PackOptions): string[];
|
|
288
|
+
//# sourceMappingURL=transcript.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! AllyHub. Copyright (c) 2026 AllyHub, Inc. All rights reserved. Use is subject to LICENSE.md. */
|
|
2
|
+
import{frameDb as E}from"./voice.js";import{findLine as z,joinWords as G,LINE_FOUND as K,normText as N,ScriptAlignment as Q,WordStream as q}from"./words.js";const b=t=>Math.round(t*1e3)/1e3,_=t=>Math.round(t*10)/10;export function takeLevels(t){const e=Array.from(t.db,n=>-n).filter(n=>n>-100).sort((n,a)=>n-a);if(e.length===0)return{floor:-100,speech:-100,threshold:-60};const r=n=>e[Math.floor((e.length-1)*n)]??-100,u=r(.1),i=r(.95);return{floor:_(u),speech:_(i),threshold:_(Math.max(u+.3*(i-u),u+6))}}function V(t,e,r){return[Math.round(e/t),Math.max(Math.round(e/t)+1,Math.round(r/t))]}export function wordLevels(t,e){return t.map(r=>{const[u,i]=V(e.hop,r.start,r.end);let n=-120,a=0,f=0;for(let l=u;l<i&&l<e.db.length;l++){const s=E(e,l);n=Math.max(n,s),a+=s,f++}return{peak:_(n),mean:_(f?a/f:-120)}})}const X=.06;export function tightenWords(t,e){const{threshold:r}=takeLevels(e),u=e.hop,i=Math.round(X/u);let n=0;return{words:t.map(f=>{const l=Math.max(0,Math.round(f.start/u)),s=Math.min(e.db.length,Math.round(f.end/u));if(s<=l+i)return{...f};const d=g=>E(e,g)>=r;let x=!1;for(let g=l;g<s;g++)d(g)&&(x=!0);if(!x)return{...f};let o=l;for(;o+i<s&&!d(o);)o++;let c=s;for(;c>o+i&&!d(c-1);)c--;const h=o>l?b(Math.max(f.start,o*u-u/2)):f.start,M=c<s?b(Math.min(f.end,Math.max(h,c*u-u/2))):f.end;return(h!==f.start||M!==f.end)&&n++,{...f,start:h,end:M}}),moved:n}}export const WORD_SHAPE_DEFAULTS={voiced:.6,dip:10};const U=8,C=2,Y=/\p{L}/gu,Z=/\p{N}/u;function H(t){const e=N(t);return Z.test(e)?0:e.match(Y)?.length??0}const w=t=>{const e=[...t].sort((u,i)=>u-i),r=e.length>>1;return e.length%2?e[r]??0:((e[r-1]??0)+(e[r]??0))/2};export function speakingRate(t){const e=new Map;let r=0;for(const x of t){const o=H(x.text),c=x.end-x.start;o===0||!(c>0)||(e.set(o,[...e.get(o)??[],c]),r++)}if(r<U)return;let u=0,i=0,n=0,a=0,f=0;for(const[x,o]of e){const c=o.length,h=w(o);u+=c,i+=c*x,n+=c*h,a+=c*x*x,f+=c*x*h}const l=u*a-i*i;let s=l>1e-9?(u*f-i*n)/l:0,d=(n-s*i)/u;if((d<0||l<=1e-9)&&(d=0,s=a>0?f/a:0),s>0)return{base:b(d),perLetter:b(s),words:r}}export function wordShapes(t,e,r={}){const u={voiced:r.voiced??WORD_SHAPE_DEFAULTS.voiced,dip:r.dip??WORD_SHAPE_DEFAULTS.dip},i=speakingRate(t),n=e.hop,a=Math.round(u.voiced*100),f=t.map((l,s)=>{const d=Math.max(0,l.end-l.start),x=H(l.text),o=i&&x>0?b(i.base+i.perLetter*x):null,c=Math.max(0,Math.round(l.start/n)),h=Math.min(e.db.length,Math.round(l.end/n)),M=[];let g=-1;for(let p=c;p<=h;p++){const $=p<h&&(e.voicing[p]??0)>=a;$&&g<0&&(g=p),!$&&g>=0&&(p-g>=C&&M.push({start:b(g*n),end:b(p*n)}),g=-1)}const m=[],L=new Float64Array(Math.max(0,h-c));let A=-120;for(let p=h-1;p>=c;p--)A=Math.max(A,E(e,p)),L[p-c]=A;let W=-120,S=-1,k=0;for(let p=c;p<=h;p++){let $=0;p<h&&(W=Math.max(W,E(e,p)),$=Math.min(W,L[p-c]??-120)-E(e,p)),$>=u.dip?(S<0&&(S=p),k=Math.max(k,$)):S>=0&&(p-S>=C&&m.push({start:b(S*n),end:b(p*n),depth:_(k)}),S=-1,k=0)}return{i:s,dur:b(d),letters:x,expected:o,ratio:o===null?null:Math.round(d/o*100)/100,excess:o===null?null:b(d-o),voicedRuns:M,dips:m}});return{rate:i??null,...i?{}:{rateWhy:t.length<U?`the take has under ${String(U)} words with letters`:"the take's longer words do not last longer than its short ones"},options:u,words:f}}export const LONG_WORD_DEFAULTS={ratio:2,excess:.15};export function longWords(t,e={}){const r=e.ratio??LONG_WORD_DEFAULTS.ratio,u=e.excess??LONG_WORD_DEFAULTS.excess;return t.filter(i=>i.ratio!==null&&i.excess!==null&&i.ratio>=r&&i.excess>=u)}export function longLabel(t){return`(long ${t.dur.toFixed(2)}s ×${(t.ratio??0).toFixed(1)})`}export const PARAGRAPH_GAP=.5;export function paragraphs(t,e=PARAGRAPH_GAP,r=0,u=t.length-1){const i=[];let n=r;for(let a=r;a<=u;a++){const f=t[a],l=t[a+1];if(!f)break;if(a===u||!l||l.start-f.end>=e){const s=t[n];s&&i.push({from:n,to:a,start:s.start,end:f.end,text:G(t.slice(n,a+1))}),n=a+1}}return i}export function searchWords(t,e){const r=e.split(/\s+/u).map(N).filter(n=>n!=="");if(r.length===0)return[];const u=t.map(n=>N(n.text)),i=[];for(let n=0;n+r.length<=t.length;n++){let a=!0;for(let f=0;f<r.length&&a;f++){const l=u[n+f]??"",s=r[f]??"";a=f===r.length-1?l.startsWith(s):l===s}a&&i.push(y(t,n,n+r.length-1))}return i}function y(t,e,r){return{from:e,to:r,start:t[e]?.start??0,end:t[r]?.end??0,text:G(t.slice(e,r+1))}}export function phraseMatches(t,e){const r=e.map(n=>({phrase:n,norm:n.split(/\s+/u).map(N).filter(a=>a!=="")})).filter(n=>n.norm.length>0).sort((n,a)=>a.norm.length-n.norm.length),u=t.map(n=>N(n.text)),i=[];for(let n=0;n<t.length;n++)for(const a of r)if(!(n+a.norm.length>t.length)&&a.norm.every((f,l)=>u[n+l]===f)){i.push({...y(t,n,n+a.norm.length-1),phrase:a.phrase}),n+=a.norm.length-1;break}return i}export function pauseCandidates(t,e,r,u=0,i=t.length-1){const n=[];for(let a=u;a<i;a++){const f=t[a],l=t[a+1];if(!f||!l)continue;const s=l.start-f.end;if(s<e)continue;const d=Math.min(r,s)/2;n.push({after:a,start:f.end,end:l.start,gap:b(s),remove:{from:b(f.end+d),to:b(l.start-d),seconds:b(Math.max(0,s-2*d))}})}return n}export const JOIN_NEAR=.2;export function joinsOf(t,e,r,u,i=JOIN_NEAR){const{ranges:n,kept:a}=e,f=r?wordLevels(t,r):void 0,l=r?.hop??.01,s=[];let d=0;for(let x=0;x+1<n.length;x++){const o=n[x],c=n[x+1];if(!o||!c)continue;d+=o.to-o.from;let h=-1,M=-1;for(const v of a){const F=t[v];F&&(F.start<o.to&&(h=v),M<0&&F.end>c.from&&(M=v))}const g=t[h],m=t[M];if(!g||!m)continue;const L=(v,F,O)=>{if(!r)return null;const I=Math.ceil(v/l-1e-9),R=Math.ceil(F/l-1e-9)-1;let D=0;for(let T=0;T<=R-I;T++){const J=O?R-T:I+T;if(E(r,J)>=u)break;D++}return b(D*l)},A=(v,F)=>{const O=Math.ceil(v/l-1e-9),I=Math.ceil(F/l-1e-9)-1,R=[];if(!r)return R;for(let D=Math.max(0,O);D<=I&&D<r.db.length;D++)R.push(E(r,D));return R},W=(v,F)=>{const O=A(v,F);return O.length?_(Math.max(...O)):null},S=(v,F)=>{const O=A(v,Math.max(F,v+l));return O.length?_(O.reduce((I,R)=>I+R,0)/O.length):null},k=(v,F,O,I,R,D,T)=>({i:v,text:F.text,edge:O,gap:b(I),quiet:R,peakBetween:D,peak:f?.[v]?.peak??null,mean:f?.[v]?.mean??null,near:T}),p=Math.min(g.end,o.to),$=Math.max(m.start,c.from),j=k(h,g,p,o.to-p,L(o.from,o.to,!0),W(p,o.to),S(Math.max(g.start,p-i),p)),P=k(M,m,$,$-c.from,L(c.from,c.to,!1),W(c.from,$),S($,Math.min(m.end,$+i)));s.push({at:b(d),out:o.to,in:c.from,removed:M>h+1?{from:h+1,to:M-1}:null,inWord:g.end>o.to+1e-9||m.start<c.from-1e-9,before:j,after:P,step:j.near===null||P.near===null?null:_(P.near-j.near)})}return s}export const SCRIPT_DIFF_DEFAULTS={match:.5,lineMatch:K};export function scriptDiff(t,e,r={}){const u={match:r.match??SCRIPT_DIFF_DEFAULTS.match,lineMatch:r.lineMatch??SCRIPT_DIFF_DEFAULTS.lineMatch},i=new q(t),n=e.filter(o=>N(o)!==""),a=new Q(i,n),f=[];let l;for(let o=0;o<=t.length;o++){let c=!1;if(o<t.length){const h=i.charOf(o),M=i.charOf(o+1);let g=0;for(let m=h;m<M;m++)g+=a.takeHits[m]??0;c=M>h&&g/(M-h)<u.match}c&&l===void 0&&(l=o),!c&&l!==void 0&&(f.push(y(t,l,o-1)),l=void 0)}const s=(o,c,h)=>{if(h<c)return[];const M=new q(t.slice(c,h+1)),g=z(M,o,0);return!g||g.score<u.lineMatch?[]:[...s(o,c,c+g.first-1),y(t,c+g.first,c+g.last),...s(o,c+g.last+1,h)]},d=n.map((o,c)=>{const h=a.lines[c]?.length??0;return{line:c,text:o,share:h?Math.round((a.matched[c]??0)/h*1e3)/1e3:0,matches:s(o,0,t.length-1)}}),x=d.filter(o=>o.matches.length>1).map(({line:o,text:c,matches:h})=>({line:o,text:c,matches:h}));return{options:u,unscripted:f,repeated:x,lines:d}}const B=t=>t.toFixed(2).padStart(6,"0");export const LINE_WORDS=12;export function soundLabel(t,e=!1){const r=t.peak>=0?`+${String(t.peak)}`:`−${String(-t.peak)}`;return`(${e?"cut ":""}sound ${t.start.toFixed(2)}–${t.end.toFixed(2)} ${(t.end-t.start).toFixed(2)}s ${r}dB v${t.voiced.toFixed(2)})`}export function packTranscript(t,e={}){const r=Math.max(0,e.from??0),u=Math.min(t.length-1,e.to??t.length-1),i=e.sounds??[],n=e.lineWords??LINE_WORDS,a=s=>(e.removedSounds??[]).some(d=>d.from<s.end&&d.to>s.start)||e.removed?.has(s.after)===!0&&e.removed.has(s.after+1),f=[],l=[];for(const s of paragraphs(t,e.gap??PARAGRAPH_GAP,r,u)){let d=s.from;for(let x=s.from;x<=s.to;x++){const o=/[.?!。?!]["')\]]*$/u.test(t[x]?.text??"");(x===s.to||o&&x-d+1>=n)&&(l.push({from:d,to:x}),d=x+1)}}for(const s of l){const d=[],x=i.filter(m=>m.after===s.from-1&&s.from===r);for(const m of x)d.push(soundLabel(m,a(m)));let o,c;const h=()=>{o&&d.push(`[-${o.join(" ")}-]`),c&&d.push(`{${c.join(" ")}}`),o=void 0,c=void 0};for(let m=s.from;m<=s.to;m++){const L=t[m]?.text??"",A=e.unscripted?.has(m)===!0;e.removed?.has(m)===!0?(c&&h(),(o??=[]).push(A?`{${L}}`:L)):A?(o&&h(),(c??=[]).push(L)):(h(),d.push(L));const W=t[m],S=e.long?.get(m);S&&e.removed?.has(m)!==!0&&(h(),d.push(longLabel(S)));for(const k of e.inWord??[]){if(!W||e.removed?.has(m)===!0)continue;const p=t[m-1];k.from<W.end&&k.to>W.start&&!(p&&m>s.from&&k.from<p.end&&k.to>p.start)&&(h(),d.push(`(cut ${k.from.toFixed(2)}–${k.to.toFixed(2)} in word)`))}(m-s.from)%8===7&&m<s.to&&(h(),d.push(`#${String(m+1)}`));for(const k of i.filter(p=>p.after===m))h(),d.push(soundLabel(k,a(k)))}h();const M=t[s.from],g=t[s.to];f.push(`[${B(M?.start??0)}-${B(g?.end??0)}] #${String(s.from)}-#${String(s.to)} ${d.join(" ")}`)}return f}
|