@hypit/hypit 0.1.3 → 0.1.5
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/README.md +5 -3
- package/dist/public/caption.d.ts +206 -183
- package/dist/public/composition.d.ts +25 -3
- package/dist/public/endpoint-kit.d.ts +24 -2
- package/dist/public/generation.d.ts +5 -1
- package/dist/public/hyperframes.d.ts +19 -1
- package/dist/public/narrative.d.ts +17 -3
- package/dist/public/performance.d.ts +1590 -0
- package/dist/public/program-space.d.ts +179 -32
- package/dist/public/runtime-kit.d.ts +21 -8
- package/dist/public/sound.d.ts +822 -0
- package/dist/public/speech.d.ts +41 -0
- package/dist/public/studio-adapter.d.ts +107 -16
- package/dist/public/temporal-markup.d.ts +9 -44
- package/dist/public/temporal.d.ts +37 -28
- package/dist/public/{semantic-track.d.ts → timeline.d.ts} +62 -49
- package/examples/README.md +18 -10
- package/examples/minimal-author-package/packages/example-component/preview/preview.svml +19 -12
- package/examples/minimal-author-package/packages/example-component/src/component.ts +5 -5
- package/examples/minimal-author-package/packages/example-component/src/fragment.ts +3 -5
- package/examples/minimal-author-package/packages/example-component/src/manifest.ts +8 -10
- package/examples/minimal-author-package/packages/example-component/src/surface.ts +2 -2
- package/examples/provider-package/README.md +78 -0
- package/examples/provider-package/hypit.runtime.json +12 -0
- package/examples/provider-package/packages/provider-images/package.json +11 -0
- package/examples/provider-package/packages/provider-images/src/activation.ts +24 -0
- package/examples/provider-package/packages/provider-images/src/provider.ts +122 -0
- package/examples/provider-package/packages/provider-images/tsconfig.json +9 -0
- package/examples/semantic-composition/README.md +6 -0
- package/examples/semantic-composition/chat.svml +6 -5
- package/examples/semantic-composition/packages/chat-scene/README.md +3 -3
- package/examples/semantic-composition/packages/chat-scene/src/activation.ts +18 -21
- package/examples/semantic-composition/packages/chat-scene/src/render.ts +4 -4
- package/examples/semantic-composition/packages/performance-styles/README.md +42 -0
- package/examples/semantic-composition/packages/performance-styles/package.json +25 -0
- package/examples/semantic-composition/packages/performance-styles/src/activation.ts +57 -0
- package/examples/semantic-composition/packages/performance-styles/src/render.ts +54 -0
- package/examples/semantic-composition/packages/performance-styles/src/studio.ts +28 -0
- package/examples/semantic-composition/packages/performance-styles/tsconfig.json +18 -0
- package/examples/semantic-composition/packages/responsive-explainer/README.md +16 -9
- package/examples/semantic-composition/packages/responsive-explainer/src/activation.ts +12 -12
- package/examples/semantic-composition/packages/responsive-explainer/src/render.ts +5 -5
- package/examples/semantic-composition/packages/sound-styles/README.md +36 -0
- package/examples/semantic-composition/packages/sound-styles/package.json +25 -0
- package/examples/semantic-composition/packages/sound-styles/src/activation.ts +53 -0
- package/examples/semantic-composition/packages/sound-styles/src/render.ts +14 -0
- package/examples/semantic-composition/packages/sound-styles/tsconfig.json +18 -0
- package/package.json +35 -15
- package/packages/audio-track/README.md +20 -13
- package/packages/audio-track/package.json +1 -1
- package/packages/audio-track/src/component.ts +4 -4
- package/packages/audio-track/src/fragment.ts +6 -5
- package/packages/audio-track/src/index.ts +1 -1
- package/packages/audio-track/src/manifest.ts +17 -16
- package/packages/audio-track/src/program.ts +21 -25
- package/packages/audio-track/src/surface.ts +19 -18
- package/packages/audio-track-studio/README.md +23 -0
- package/packages/audio-track-studio/src/index.ts +33 -19
- package/packages/author-kit/README.md +1 -1
- package/packages/background-removal/README.md +4 -7
- package/packages/browser-capture/package.json +1 -1
- package/packages/build-result/README.md +69 -0
- package/packages/build-result/package.json +2 -1
- package/packages/build-result/src/decode.ts +12 -8
- package/packages/build-result/src/execution-log.ts +17 -0
- package/packages/build-result/src/file-reference.ts +42 -0
- package/packages/build-result/src/index.ts +4 -0
- package/packages/build-result/src/replace-file-windows.ts +58 -0
- package/packages/build-result/src/replace-file.ts +11 -0
- package/packages/build-result/src/store.ts +58 -14
- package/packages/build-result/src/types.ts +41 -8
- package/packages/build-result/src/writer.ts +12 -1
- package/packages/build-result-fs/README.md +23 -1
- package/packages/build-result-s3/README.md +5 -0
- package/packages/build-result-s3/src/repository.ts +23 -5
- package/packages/caption/README.md +61 -73
- package/packages/caption/package.json +3 -2
- package/packages/caption/src/activation.ts +2 -2
- package/packages/caption/src/component.ts +20 -5
- package/packages/caption/src/display.ts +3 -18
- package/packages/caption/src/fragment.ts +3 -7
- package/packages/caption/src/index.ts +6 -5
- package/packages/caption/src/manifest.ts +29 -46
- package/packages/caption/src/style.ts +24 -135
- package/packages/caption/src/surface.ts +12 -92
- package/packages/caption/src/temporalize.ts +18 -53
- package/packages/caption/src/types.ts +8 -35
- package/packages/caption/src/visibility.ts +23 -0
- package/packages/caption-fine/README.md +31 -11
- package/packages/caption-fine/package.json +4 -2
- package/packages/caption-fine/src/component.ts +3 -3
- package/packages/caption-fine/src/fragment.ts +7 -19
- package/packages/caption-fine/src/index.ts +2 -0
- package/packages/caption-fine/src/manifest.ts +27 -18
- package/packages/caption-fine/src/recipe.ts +7 -0
- package/packages/caption-fine/src/render.ts +62 -49
- package/packages/caption-fine/src/schedule.ts +39 -35
- package/packages/caption-fine/src/style.ts +10 -9
- package/packages/caption-fine/src/surface.ts +62 -35
- package/packages/caption-fine/src/types.ts +2 -0
- package/packages/caption-fine-studio/README.md +24 -2
- package/packages/caption-fine-studio/package.json +10 -3
- package/packages/caption-fine-studio/src/activation.ts +3 -3
- package/packages/caption-fine-studio/src/index.ts +61 -40
- package/packages/cli/README.md +81 -3
- package/packages/cli/package.json +1 -0
- package/packages/cli/src/arguments.ts +39 -15
- package/packages/cli/src/build-planning.ts +9 -3
- package/packages/cli/src/command.ts +7 -1
- package/packages/cli/src/commands/environment.ts +66 -27
- package/packages/cli/src/commands/execution.ts +81 -26
- package/packages/cli/src/commands/results.ts +7 -11
- package/packages/cli/src/index.ts +2 -2
- package/packages/cli/src/machine-view.ts +15 -5
- package/packages/cli/src/main.ts +38 -42
- package/packages/cli/src/observation.ts +7 -1
- package/packages/cli/src/output.ts +92 -34
- package/packages/cli/src/result-export.ts +22 -13
- package/packages/cli/src/run-file.ts +19 -8
- package/packages/cli/src/view.ts +64 -18
- package/packages/comment-sticker/README.md +3 -3
- package/packages/comment-sticker/package.json +1 -1
- package/packages/comment-sticker/src/component.ts +4 -4
- package/packages/comment-sticker/src/fragment.ts +5 -4
- package/packages/comment-sticker/src/manifest.ts +7 -6
- package/packages/comment-sticker/src/program.ts +9 -9
- package/packages/comment-sticker/src/surface.ts +6 -7
- package/packages/comment-sticker-studio/src/index.ts +2 -1
- package/packages/compiler-node/src/compiler.ts +1 -0
- package/packages/composition/README.md +21 -0
- package/packages/composition/src/audio-presentation.ts +44 -0
- package/packages/composition/src/index.ts +3 -0
- package/packages/composition/src/schema.ts +8 -3
- package/packages/composition/src/track.ts +15 -1
- package/packages/credential-store-env/README.md +1 -1
- package/packages/deck-track/README.md +3 -3
- package/packages/deck-track/package.json +1 -1
- package/packages/deck-track/src/component.ts +5 -5
- package/packages/deck-track/src/fragment.ts +6 -5
- package/packages/deck-track/src/lower.ts +12 -12
- package/packages/deck-track/src/manifest.ts +8 -7
- package/packages/deck-track/src/program.ts +13 -16
- package/packages/deck-track/src/surface.ts +9 -10
- package/packages/driver-node/src/driver.ts +41 -3
- package/packages/elevenlabs-speech/README.md +27 -0
- package/packages/{provider-xiaomi-mimo → elevenlabs-speech}/package.json +5 -8
- package/packages/elevenlabs-speech/src/activation.ts +26 -0
- package/packages/elevenlabs-speech/src/fragment.ts +11 -0
- package/packages/elevenlabs-speech/src/index.ts +111 -0
- package/packages/elevenlabs-speech/src/surface.ts +167 -0
- package/packages/endpoint-kit/README.md +24 -0
- package/packages/endpoint-kit/src/index.ts +7 -1
- package/packages/estimate/README.md +56 -3
- package/packages/estimate/src/program.ts +7 -8
- package/packages/film/README.md +12 -7
- package/packages/film/package.json +1 -1
- package/packages/film/src/component.ts +4 -4
- package/packages/film/src/fragment.ts +6 -5
- package/packages/film/src/manifest.ts +11 -10
- package/packages/film/src/program.ts +5 -5
- package/packages/film/src/recipe.ts +2 -1
- package/packages/film/src/surface.ts +6 -6
- package/packages/film-studio/package.json +1 -1
- package/packages/film-studio/src/index.ts +2 -2
- package/packages/fishaudio-speech/README.md +33 -0
- package/packages/fishaudio-speech/package.json +21 -0
- package/packages/fishaudio-speech/src/activation.ts +32 -0
- package/packages/fishaudio-speech/src/fragment.ts +11 -0
- package/packages/fishaudio-speech/src/index.ts +156 -0
- package/packages/fishaudio-speech/src/surface.ts +192 -0
- package/packages/fonts-open/README.md +5 -0
- package/packages/fonts-open/package.json +5 -1
- package/packages/fonts-open/src/studio.ts +21 -0
- package/packages/generation/README.md +11 -1
- package/packages/generation/src/mapping.ts +28 -30
- package/packages/gpt-image/README.md +1 -2
- package/packages/grok-imagine/README.md +1 -2
- package/packages/hyperframes/README.md +7 -3
- package/packages/hyperframes/src/browser-program.ts +11 -2
- package/packages/hyperframes/src/document.ts +15 -2
- package/packages/interview-emoji-reveal/README.md +4 -4
- package/packages/interview-emoji-reveal/package.json +1 -1
- package/packages/interview-emoji-reveal/src/component.ts +4 -4
- package/packages/interview-emoji-reveal/src/fragment.ts +6 -5
- package/packages/interview-emoji-reveal/src/manifest.ts +9 -8
- package/packages/interview-emoji-reveal/src/program.ts +14 -14
- package/packages/interview-emoji-reveal/src/surface.ts +8 -9
- package/packages/media-execution/README.md +7 -3
- package/packages/media-execution/src/audio-presentation.ts +23 -0
- package/packages/media-execution/src/execute.ts +2 -0
- package/packages/media-pipeline/README.md +7 -3
- package/packages/media-pipeline/src/audio-plan.ts +4 -1
- package/packages/media-pipeline/src/component.ts +16 -2
- package/packages/media-pipeline/src/manifest.ts +3 -1
- package/packages/media-pipeline/src/types.ts +2 -1
- package/packages/media-track/README.md +14 -47
- package/packages/media-track/package.json +1 -1
- package/packages/media-track/preview/preview.svml +5 -5
- package/packages/media-track/src/author.ts +12 -6
- package/packages/media-track/src/component.ts +10 -16
- package/packages/media-track/src/fragment.ts +8 -7
- package/packages/media-track/src/index.ts +3 -1
- package/packages/media-track/src/lower.ts +7 -7
- package/packages/media-track/src/manifest.ts +16 -38
- package/packages/media-track/src/program.ts +62 -67
- package/packages/media-track/src/sampling.ts +6 -6
- package/packages/media-track/src/sequence.ts +8 -8
- package/packages/media-track/src/surface.ts +25 -43
- package/packages/media-track-studio/README.md +9 -0
- package/packages/media-track-studio/src/index.ts +23 -13
- package/packages/mimo-speech/README.md +1 -1
- package/packages/minimax-h3/README.md +1 -1
- package/packages/nano-banana/README.md +1 -1
- package/packages/narrative/README.md +23 -1
- package/packages/narrative/src/identity.ts +11 -0
- package/packages/narrative/src/index.ts +3 -0
- package/packages/narrative/src/schema.ts +28 -27
- package/packages/narrative/src/selection.ts +52 -0
- package/packages/narrative/src/types.ts +2 -0
- package/packages/package-loader-node/README.md +30 -0
- package/packages/package-loader-node/package.json +5 -2
- package/packages/package-loader-node/src/distribution-resolution.ts +10 -3
- package/packages/package-loader-node/src/index.ts +1 -0
- package/packages/package-loader-node/src/loader.ts +12 -15
- package/packages/package-loader-node/src/location.ts +27 -1
- package/packages/package-loader-node/src/module-scope.ts +183 -0
- package/packages/package-loader-node/src/types.ts +4 -0
- package/packages/performance/README.md +83 -0
- package/packages/performance/package.json +30 -0
- package/packages/performance/src/activation.ts +11 -0
- package/packages/performance/src/component.ts +46 -0
- package/packages/performance/src/index.ts +6 -0
- package/packages/performance/src/manifest.ts +53 -0
- package/packages/{media-track/src/performance.ts → performance/src/media.ts} +9 -10
- package/packages/performance/src/program.ts +51 -0
- package/packages/performance/src/style.ts +35 -0
- package/packages/performance/src/surface.ts +99 -0
- package/packages/performance-studio/README.md +25 -0
- package/packages/performance-studio/package.json +21 -0
- package/packages/performance-studio/src/activation.ts +6 -0
- package/packages/performance-studio/src/index.ts +84 -0
- package/packages/program-space/README.md +9 -18
- package/packages/program-space/src/activation.ts +1 -5
- package/packages/program-space/src/index.ts +2 -11
- package/packages/program-space/src/surface.ts +1 -20
- package/packages/project-context-node/README.md +20 -0
- package/packages/project-context-node/package.json +10 -0
- package/packages/project-context-node/src/index.ts +3 -0
- package/packages/{cli → project-context-node}/src/runtime-selection.ts +7 -2
- package/packages/provider-hyperframes-local/README.md +43 -15
- package/packages/provider-hyperframes-local/src/activation.ts +4 -3
- package/packages/provider-hyperframes-local/src/capture-process.ts +26 -4
- package/packages/provider-hyperframes-local/src/capture.ts +96 -26
- package/packages/provider-hyperframes-local/src/concurrency.ts +86 -0
- package/packages/provider-hyperframes-local/src/opaque-capture.ts +92 -0
- package/packages/provider-hyperframes-local/src/options.ts +2 -0
- package/packages/provider-hyperframes-local/src/program.ts +6 -3
- package/packages/provider-hyperframes-local/src/progress.ts +53 -0
- package/packages/provider-hyperframes-local/src/provider.ts +18 -5
- package/packages/provider-hyperframes-local/src/render.ts +48 -7
- package/packages/provider-hypihub/README.md +48 -17
- package/packages/provider-hypihub/package.json +2 -0
- package/packages/provider-hypihub/src/mapping.ts +31 -7
- package/packages/provider-hypihub/src/oauth.ts +6 -0
- package/packages/provider-hypihub/src/provider.ts +25 -13
- package/packages/provider-hypihub/src/routes.ts +1 -2
- package/packages/provider-hypihub/src/upload.ts +2 -0
- package/packages/provider-media-local/README.md +3 -4
- package/packages/provider-whisperx-local/README.md +57 -0
- package/packages/provider-whisperx-local/src/program.ts +1 -0
- package/packages/provider-whisperx-local/src/provider.ts +3 -0
- package/packages/ranking/README.md +8 -6
- package/packages/ranking/package.json +1 -1
- package/packages/ranking/src/component.ts +6 -6
- package/packages/ranking/src/fragment.ts +11 -7
- package/packages/ranking/src/manifest.ts +21 -14
- package/packages/ranking/src/render.ts +33 -35
- package/packages/ranking/src/schedule.ts +16 -19
- package/packages/ranking/src/surface.ts +12 -13
- package/packages/ranking-studio/README.md +29 -0
- package/packages/ranking-studio/package.json +8 -3
- package/packages/ranking-studio/src/index.ts +71 -12
- package/packages/render-hyperframes/README.md +7 -7
- package/packages/render-hyperframes/package.json +1 -1
- package/packages/render-hyperframes/src/component.ts +11 -1
- package/packages/render-hyperframes/src/fragment.ts +7 -4
- package/packages/render-hyperframes/src/manifest.ts +4 -4
- package/packages/render-hyperframes/src/surface.ts +6 -6
- package/packages/runtime/README.md +8 -1
- package/packages/runtime/src/catalog.ts +2 -0
- package/packages/runtime/src/execution.ts +15 -4
- package/packages/runtime/src/index.ts +2 -1
- package/packages/runtime/src/log.ts +51 -0
- package/packages/runtime/src/types.ts +5 -8
- package/packages/runtime-host-node/README.md +30 -0
- package/packages/runtime-host-node/package.json +1 -0
- package/packages/runtime-host-node/src/index.ts +25 -9
- package/packages/runtime-host-node/src/packages.ts +47 -50
- package/packages/runtime-kit/README.md +5 -0
- package/packages/runtime-kit/src/index.ts +3 -1
- package/packages/runtime-local/README.md +111 -4
- package/packages/runtime-local/src/config.ts +202 -56
- package/packages/runtime-local/src/control.ts +9 -1
- package/packages/runtime-local/src/executor.ts +66 -0
- package/packages/runtime-local/src/host.ts +37 -17
- package/packages/runtime-local/src/log.ts +48 -0
- package/packages/runtime-local/src/programs.ts +41 -25
- package/packages/runtime-local/src/result-writer.ts +2 -0
- package/packages/runtime-local/src/runtime.ts +10 -6
- package/packages/runtime-local/src/supervisor.ts +142 -0
- package/packages/runtime-local/src/types.ts +9 -2
- package/packages/runtime-local/src/worker-process.ts +7 -24
- package/packages/runtime-local/src/worker.ts +55 -83
- package/packages/screen-overlay/README.md +3 -3
- package/packages/screen-overlay/package.json +1 -1
- package/packages/screen-overlay/src/component.ts +3 -3
- package/packages/screen-overlay/src/fragment.ts +5 -4
- package/packages/screen-overlay/src/manifest.ts +7 -6
- package/packages/screen-overlay/src/program.ts +9 -9
- package/packages/screen-overlay/src/surface.ts +6 -7
- package/packages/script/README.md +37 -2
- package/packages/script/src/edit.ts +123 -73
- package/packages/script/src/lexical.ts +40 -6
- package/packages/script/src/manifest.ts +2 -2
- package/packages/script/src/narrative.ts +1 -0
- package/packages/script/src/parser.ts +36 -8
- package/packages/script/src/surface.ts +4 -3
- package/packages/script/src/types.ts +5 -1
- package/packages/script-studio/package.json +9 -3
- package/packages/script-studio/src/index.ts +2 -0
- package/packages/script-studio/src/projection.ts +105 -0
- package/packages/seedance/README.md +30 -1
- package/packages/seedance/src/index.ts +18 -7
- package/packages/seedance/src/surface.ts +17 -4
- package/packages/seedance-kits/README.md +10 -2
- package/packages/seedance-kits/kits/speaker-v1.svs +5 -5
- package/packages/seedream/README.md +1 -1
- package/packages/sound/README.md +81 -0
- package/packages/sound/package.json +25 -0
- package/packages/sound/src/activation.ts +11 -0
- package/packages/sound/src/component.ts +28 -0
- package/packages/sound/src/index.ts +5 -0
- package/packages/sound/src/manifest.ts +47 -0
- package/packages/sound/src/program.ts +84 -0
- package/packages/sound/src/style.ts +34 -0
- package/packages/sound/src/surface.ts +90 -0
- package/packages/sound-studio/README.md +22 -0
- package/packages/sound-studio/package.json +20 -0
- package/packages/sound-studio/src/activation.ts +6 -0
- package/packages/sound-studio/src/index.ts +74 -0
- package/packages/speech/README.md +2 -2
- package/packages/speech-alignment/src/align.ts +45 -21
- package/packages/speech-alignment/src/local.ts +8 -0
- package/packages/speech-alignment/src/locate.ts +1 -1
- package/packages/store-sqlite/README.md +7 -0
- package/packages/store-sqlite/src/store.ts +84 -83
- package/packages/studio/INSPECTOR.md +117 -0
- package/packages/studio/README.md +149 -14
- package/packages/studio/package.json +8 -7
- package/packages/studio/src/build-library.ts +99 -84
- package/packages/studio/src/companion-assembly.ts +1 -0
- package/packages/studio/src/domain.ts +1 -1
- package/packages/studio/src/fallback-companions.ts +3 -3
- package/packages/studio/src/feedback-server.ts +51 -0
- package/packages/studio/src/feedback-store.ts +66 -0
- package/packages/studio/src/feedback.ts +60 -0
- package/packages/studio/src/library-media.ts +19 -0
- package/packages/studio/src/parameter-values.ts +83 -1
- package/packages/studio/src/parameters.ts +132 -43
- package/packages/studio/src/preview/render.ts +5 -1
- package/packages/studio/src/preview/runtime-shim.ts +49 -3
- package/packages/studio/src/programme.ts +14 -30
- package/packages/studio/src/server.ts +66 -34
- package/packages/studio/src/shared.ts +24 -8
- package/packages/studio/src/snapshot.ts +21 -132
- package/packages/studio/src/studio-preflight.ts +3 -3
- package/packages/studio/src/studio-registry.ts +72 -6
- package/packages/studio/src/style.css +342 -190
- package/packages/studio/src/temporal-edit.ts +131 -0
- package/packages/studio/src/ui/artifact-name.ts +80 -0
- package/packages/studio/src/ui/artifact-preview.ts +99 -0
- package/packages/studio/src/ui/comments.ts +233 -0
- package/packages/studio/src/ui/icons.ts +10 -1
- package/packages/studio/src/ui/library.ts +373 -192
- package/packages/studio/src/ui/main.ts +291 -110
- package/packages/studio/src/ui/material-preview.ts +1 -1
- package/packages/studio/src/ui/overlay.ts +31 -26
- package/packages/studio/src/ui/scrub-preview.ts +108 -0
- package/packages/studio/src/ui/sidebar-panel.ts +31 -0
- package/packages/studio/src/ui/stage.ts +188 -9
- package/packages/studio/src/ui/timeline.ts +187 -281
- package/packages/studio/start.ts +19 -5
- package/packages/studio-adapter/README.md +151 -11
- package/packages/studio-adapter/src/index.ts +126 -14
- package/packages/temporal/README.md +6 -6
- package/packages/temporal/package.json +1 -1
- package/packages/temporal/src/component.ts +5 -6
- package/packages/temporal/src/index.ts +8 -6
- package/packages/temporal/src/location.ts +11 -11
- package/packages/temporal/src/projection.ts +19 -19
- package/packages/temporal/src/rational.ts +4 -4
- package/packages/temporal-markup/EDITING.md +183 -0
- package/packages/temporal-markup/README.md +31 -11
- package/packages/temporal-markup/package.json +1 -1
- package/packages/temporal-markup/src/index.ts +20 -25
- package/packages/temporal-markup/src/space.ts +10 -41
- package/packages/timeline/README.md +31 -0
- package/packages/{semantic-track → timeline}/package.json +1 -1
- package/packages/timeline/src/activation.ts +8 -0
- package/packages/timeline/src/component.ts +24 -0
- package/packages/timeline/src/identity.ts +60 -0
- package/packages/timeline/src/index.ts +6 -0
- package/packages/{semantic-track → timeline}/src/location.ts +20 -20
- package/packages/timeline/src/manifest.ts +39 -0
- package/packages/{semantic-track → timeline}/src/projection.ts +14 -14
- package/packages/timeline/src/types.ts +24 -0
- package/packages/timeline-author/README.md +68 -0
- package/packages/{speech-track → timeline-author}/package.json +6 -4
- package/packages/timeline-author/src/activation.ts +22 -0
- package/packages/{speech-track → timeline-author}/src/component.ts +15 -13
- package/packages/{speech-track → timeline-author}/src/fragment.ts +14 -23
- package/packages/timeline-author/src/index.ts +7 -0
- package/packages/timeline-author/src/manifest.ts +78 -0
- package/packages/timeline-author/src/program.ts +107 -0
- package/packages/timeline-author/src/surface.ts +46 -0
- package/packages/timeline-author/src/types.ts +6 -0
- package/packages/typography-track/README.md +4 -4
- package/packages/typography-track/package.json +1 -1
- package/packages/typography-track/src/component.ts +4 -4
- package/packages/typography-track/src/fragment.ts +4 -3
- package/packages/typography-track/src/manifest.ts +11 -9
- package/packages/typography-track/src/program.ts +15 -15
- package/packages/typography-track/src/surface.ts +17 -18
- package/packages/typography-track-studio/package.json +8 -3
- package/packages/typography-track-studio/src/index.ts +5 -1
- package/packages/video-cli/README.md +16 -4
- package/packages/video-cli/package.json +2 -1
- package/packages/video-cli/src/creation.ts +25 -9
- package/packages/video-cli/src/index.ts +1 -1
- package/packages/video-cli/src/studio-distribution.ts +2 -1
- package/packages/volcengine-matting/README.md +3 -3
- package/packages/whisperx/README.md +8 -1
- package/packages/workspace/src/index.ts +2 -0
- package/packages/workspace-fs-node/README.md +4 -1
- package/packages/workspace-fs-node/src/workspace.ts +3 -1
- package/services/whisperx/README.md +14 -0
- package/services/whisperx/pyproject.toml +2 -0
- package/services/whisperx/uv.lock +20 -20
- package/packages/provider-hyperframes-aws-lambda/README.md +0 -30
- package/packages/provider-hyperframes-aws-lambda/package.json +0 -30
- package/packages/provider-hyperframes-aws-lambda/src/activation.ts +0 -97
- package/packages/provider-hyperframes-aws-lambda/src/client.ts +0 -114
- package/packages/provider-hyperframes-aws-lambda/src/index.ts +0 -21
- package/packages/provider-hyperframes-aws-lambda/src/provider.ts +0 -522
- package/packages/provider-kie/README.md +0 -134
- package/packages/provider-kie/package.json +0 -43
- package/packages/provider-kie/src/activation.ts +0 -71
- package/packages/provider-kie/src/index.ts +0 -10
- package/packages/provider-kie/src/mapping.ts +0 -182
- package/packages/provider-kie/src/provider.ts +0 -657
- package/packages/provider-kie/src/routes.ts +0 -150
- package/packages/provider-xiaomi-mimo/README.md +0 -32
- package/packages/provider-xiaomi-mimo/src/activation.ts +0 -57
- package/packages/provider-xiaomi-mimo/src/index.ts +0 -5
- package/packages/provider-xiaomi-mimo/src/provider.ts +0 -214
- package/packages/runtime/src/environment.ts +0 -6
- package/packages/semantic-track/README.md +0 -21
- package/packages/semantic-track/src/activation.ts +0 -8
- package/packages/semantic-track/src/component.ts +0 -24
- package/packages/semantic-track/src/identity.ts +0 -58
- package/packages/semantic-track/src/index.ts +0 -6
- package/packages/semantic-track/src/manifest.ts +0 -38
- package/packages/semantic-track/src/types.ts +0 -26
- package/packages/speech-track/README.md +0 -51
- package/packages/speech-track/src/activation.ts +0 -19
- package/packages/speech-track/src/index.ts +0 -7
- package/packages/speech-track/src/manifest.ts +0 -73
- package/packages/speech-track/src/program.ts +0 -64
- package/packages/speech-track/src/surface.ts +0 -35
- package/packages/speech-track/src/types.ts +0 -6
- package/packages/speech-track-studio/README.md +0 -3
- package/packages/speech-track-studio/package.json +0 -14
- package/packages/speech-track-studio/src/activation.ts +0 -7
- package/packages/speech-track-studio/src/index.ts +0 -40
- /package/packages/{cli → project-context-node}/src/project-context.ts +0 -0
- /package/packages/{speech-track → timeline-author}/preview/Track.png +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import type { Timeline } from "@hypit/timeline";
|
|
1
2
|
import { assertProgramSpaceIdentity } from "@hypit/program-space";
|
|
2
|
-
import type { ProgramSpace } from "@hypit/program-space";
|
|
3
3
|
import { assertCanvasSpace } from "@hypit/spatial";
|
|
4
4
|
import type { CanvasSpace } from "@hypit/spatial";
|
|
5
5
|
import { assertAudioTrackIdentity, assertCompositionIdentity, assertVisualTrackIdentity, sealComposition } from "@hypit/composition";
|
|
@@ -64,7 +64,7 @@ export function createFilmTrackSet(): FilmTrackSet {
|
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
function appendTrack(set: FilmTrackSet, programSpace:
|
|
67
|
+
function appendTrack(set: FilmTrackSet, programSpace: Timeline, track: Track): FilmTrackSet {
|
|
68
68
|
assertFilmTrackSetIdentity(set);
|
|
69
69
|
assertProgramSpaceIdentity(programSpace);
|
|
70
70
|
if (track.kind === "visual") assertVisualTrackIdentity(track, programSpace);
|
|
@@ -78,18 +78,18 @@ function appendTrack(set: FilmTrackSet, programSpace: ProgramSpace, track: Track
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
export function appendFilmVisualTrack(set: FilmTrackSet, programSpace:
|
|
81
|
+
export function appendFilmVisualTrack(set: FilmTrackSet, programSpace: Timeline, track: VisualTrack): FilmTrackSet {
|
|
82
82
|
return appendTrack(set, programSpace, track);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
export function appendFilmAudioTrack(set: FilmTrackSet, programSpace:
|
|
85
|
+
export function appendFilmAudioTrack(set: FilmTrackSet, programSpace: Timeline, track: AudioTrack): FilmTrackSet {
|
|
86
86
|
return appendTrack(set, programSpace, track);
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
export function compileFilmComposition(
|
|
90
90
|
program: FilmProgram,
|
|
91
91
|
canvas: CanvasSpace,
|
|
92
|
-
programSpace:
|
|
92
|
+
programSpace: Timeline,
|
|
93
93
|
set: FilmTrackSet,
|
|
94
94
|
): Composition {
|
|
95
95
|
assertFilmProgramIdentity(program);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { Timeline } from "@hypit/timeline";
|
|
1
2
|
import type { SvsRecipe } from "@hypit/svs";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
|
-
* The Film Recipe owns Film appearance only. Canvas geometry and
|
|
5
|
+
* The Film Recipe owns Film appearance only. Canvas geometry and Timeline
|
|
5
6
|
* remain separate graph inputs and cannot be smuggled into a stylesheet.
|
|
6
7
|
*/
|
|
7
8
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { resolveTemporalContext } from "@hypit/temporal-markup";
|
|
2
2
|
import { spatialTypes } from "@hypit/spatial";
|
|
3
3
|
import { compositionTypes } from "@hypit/composition";
|
|
4
4
|
import type { AudioTrack, Track, VisualTrack } from "@hypit/composition";
|
|
@@ -93,13 +93,13 @@ function trackKind(reference: SurfaceResolvedReference): "visual" | "audio" {
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
export const decodeFilmSurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {
|
|
96
|
-
exactAttributes(element, ["id", "canvas",
|
|
96
|
+
exactAttributes(element, ["id", "canvas", "timeline", "appearance"]);
|
|
97
97
|
const id = stringAttribute(element, "id");
|
|
98
98
|
const canvas = requiredReference(element, "canvas", resolveReference);
|
|
99
99
|
if (!sameType(canvas.type, spatialTypes.canvas)) {
|
|
100
100
|
throw new Error(`${element.name}.canvas must reference CanvasSpace`);
|
|
101
101
|
}
|
|
102
|
-
const
|
|
102
|
+
const context = resolveTemporalContext({ element, resolveReference });
|
|
103
103
|
const appearanceReference = requiredReference(element, "appearance", resolveReference);
|
|
104
104
|
const appearance = filmAppearanceFromRecipe(
|
|
105
105
|
recipe(appearanceReference, `${element.name}.appearance`).properties,
|
|
@@ -129,18 +129,18 @@ export const decodeFilmSurface: StructuredSurfaceHandler = ({ element, resolveRe
|
|
|
129
129
|
value: { kind: "inline", value: program },
|
|
130
130
|
range: element.range,
|
|
131
131
|
}],
|
|
132
|
-
components: [
|
|
132
|
+
components: [{
|
|
133
133
|
id,
|
|
134
134
|
fragment: fragment.id,
|
|
135
135
|
inputs: {
|
|
136
136
|
program: { kind: "record", id: programId },
|
|
137
137
|
canvas: canvas.ref,
|
|
138
|
-
|
|
138
|
+
timeline: context.timeline.ref,
|
|
139
139
|
...Object.fromEntries(tracks.map((track) => [track.name, track.source.ref])),
|
|
140
140
|
},
|
|
141
141
|
outputs: { composition: `${id}.composition` },
|
|
142
142
|
range: element.range,
|
|
143
143
|
}],
|
|
144
|
-
fragments: [
|
|
144
|
+
fragments: [fragment],
|
|
145
145
|
};
|
|
146
146
|
};
|
|
@@ -2,13 +2,13 @@ import { programSpaceTypes } from "@hypit/program-space";
|
|
|
2
2
|
import type { StudioFilmCompanion } from "@hypit/studio-adapter";
|
|
3
3
|
import { compositionTypes } from "@hypit/composition";
|
|
4
4
|
import { filmModuleRef } from "@hypit/film";
|
|
5
|
-
import {
|
|
5
|
+
import { timelineTypes } from "@hypit/timeline";
|
|
6
6
|
|
|
7
7
|
/** Film owns the author vocabulary that selects its time source and peer Tracks. */
|
|
8
8
|
export const filmStudioCompanions: readonly StudioFilmCompanion[] = [{
|
|
9
9
|
id: "film",
|
|
10
10
|
match: { module: filmModuleRef, surface: "film", outputType: compositionTypes.composition },
|
|
11
|
-
timeSources: [{ attribute: "
|
|
11
|
+
timeSources: [{ attribute: "timeline", type: timelineTypes.track }],
|
|
12
12
|
tracks: {
|
|
13
13
|
childSurface: "Track",
|
|
14
14
|
sourceAttribute: "source",
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# `@hypit/fishaudio-speech`
|
|
2
|
+
|
|
3
|
+
Exact model contracts and author Surfaces for Fish Audio Voice Design and Voice Clone.
|
|
4
|
+
|
|
5
|
+
The package owns two distinct speech operations:
|
|
6
|
+
|
|
7
|
+
- `voice-design-1` creates an ordinary audio voice reference from a natural-language description
|
|
8
|
+
and a short authored speech sample;
|
|
9
|
+
- `voice-clone` uses one accepted audio voice reference to create independent speech.
|
|
10
|
+
|
|
11
|
+
It contains no API URL, credential, retry, queue or Fish Audio wire encoding. Those belong to a
|
|
12
|
+
Runtime Endpoint such as `@hypit/provider-hypihub`. Both models return the shared
|
|
13
|
+
`GeneratedAudioSet`; the author Surfaces expose its primary member as an ordinary audio Resource.
|
|
14
|
+
|
|
15
|
+
```xml
|
|
16
|
+
<import as="fish" from="@hypit/fishaudio-speech@1"/>
|
|
17
|
+
|
|
18
|
+
<fish:VoiceDesign id="host" speech={story.segment.voiceSample.speech}>
|
|
19
|
+
A clear young woman with a grounded, confident conversational delivery.
|
|
20
|
+
</fish:VoiceDesign>
|
|
21
|
+
|
|
22
|
+
<fish:VoiceClone id="narration" speech={story.segment.reveal.speech} voice={host.reference}/>
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`host.reference` is not a special identity record. It is a normal audio Resource, so the same
|
|
26
|
+
accepted reference can also feed an A-roll video model that accepts reference audio.
|
|
27
|
+
`VoiceClone` takes spoken text and a voice reference. It has no separate natural-language delivery
|
|
28
|
+
instruction input; the description in `VoiceDesign` establishes the reference voice.
|
|
29
|
+
|
|
30
|
+
Official API reference: <https://docs.fish.audio/>
|
|
31
|
+
|
|
32
|
+
The Source import selects author syntax and exact model semantics only. The Runtime Profile
|
|
33
|
+
independently selects the Provider that fulfils either capability.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hypit/fishaudio-speech",
|
|
3
|
+
"version": "0.0.0-dev",
|
|
4
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
5
|
+
"private": true,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": "./src/index.ts"
|
|
9
|
+
},
|
|
10
|
+
"hypit": {
|
|
11
|
+
"activation": "./src/activation.ts"
|
|
12
|
+
},
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"@hypit/artifact": "workspace:*",
|
|
15
|
+
"@hypit/generation": "workspace:*",
|
|
16
|
+
"@hypit/model-kit": "workspace:*",
|
|
17
|
+
"@hypit/protocol": "workspace:*",
|
|
18
|
+
"@hypit/text": "workspace:*",
|
|
19
|
+
"@hypit/markup": "workspace:*"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createMarkupSurfaceHostFacet } from "@hypit/markup";
|
|
2
|
+
|
|
3
|
+
import {
|
|
4
|
+
decodeFishAudioVoiceCloneSurface,
|
|
5
|
+
decodeFishAudioVoiceDesignSurface,
|
|
6
|
+
fishAudioSpeechComponent,
|
|
7
|
+
fishAudioSpeechDefinition,
|
|
8
|
+
fishAudioSpeechManifest,
|
|
9
|
+
fishAudioSpeechMarkupSurfaces,
|
|
10
|
+
fishAudioSpeechModuleRef,
|
|
11
|
+
} from "./index.js";
|
|
12
|
+
|
|
13
|
+
export const hypitPackage = {
|
|
14
|
+
format: "hypit.node-package@1" as const,
|
|
15
|
+
modules: [{ manifest: fishAudioSpeechManifest }],
|
|
16
|
+
components: [fishAudioSpeechComponent],
|
|
17
|
+
hostFacets: [
|
|
18
|
+
fishAudioSpeechDefinition.hostFacet,
|
|
19
|
+
createMarkupSurfaceHostFacet({
|
|
20
|
+
module: fishAudioSpeechModuleRef,
|
|
21
|
+
declaration: fishAudioSpeechMarkupSurfaces.find((item) => item.name === "voiceDesign")!,
|
|
22
|
+
handler: decodeFishAudioVoiceDesignSurface,
|
|
23
|
+
}),
|
|
24
|
+
createMarkupSurfaceHostFacet({
|
|
25
|
+
module: fishAudioSpeechModuleRef,
|
|
26
|
+
declaration: fishAudioSpeechMarkupSurfaces.find((item) => item.name === "voiceClone")!,
|
|
27
|
+
handler: decodeFishAudioVoiceCloneSurface,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default hypitPackage;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createExactModelPrimaryGenerationFragment } from "@hypit/model-kit";
|
|
2
|
+
import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/model-kit";
|
|
3
|
+
|
|
4
|
+
/** Model result projection over the same graph-native request assembly as every exact model. */
|
|
5
|
+
export function createFishAudioSpeechAudioFragment(
|
|
6
|
+
endpoint: ExactModelEndpoint,
|
|
7
|
+
mediaInputs: readonly ExactModelMediaInput[] = [],
|
|
8
|
+
textInputs: readonly ExactModelTextInput[] = [],
|
|
9
|
+
) {
|
|
10
|
+
return createExactModelPrimaryGenerationFragment(endpoint, mediaInputs, textInputs);
|
|
11
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { artifactTypes } from "@hypit/artifact";
|
|
2
|
+
import { sealGenerationPortRequest, sealGenerationRequestDraft, sealGenerationPortTable } from "@hypit/generation";
|
|
3
|
+
import type { GenerationPortTable, GenerationPortValue, GenerationRequest } from "@hypit/generation";
|
|
4
|
+
import type { SurfaceAttributeVocabulary, SurfacePortVocabulary } from "@hypit/markup";
|
|
5
|
+
import { defineExactModelModule } from "@hypit/model-kit";
|
|
6
|
+
import { textTypes } from "@hypit/text";
|
|
7
|
+
|
|
8
|
+
export const fishAudioSpeechModuleRef = { name: "@hypit/fishaudio-speech", version: "1" } as const;
|
|
9
|
+
export const fishAudioSpeechModels = [
|
|
10
|
+
"voice-design-1",
|
|
11
|
+
"voice-clone",
|
|
12
|
+
] as const;
|
|
13
|
+
export type FishAudioSpeechModel = typeof fishAudioSpeechModels[number];
|
|
14
|
+
|
|
15
|
+
// Fish Audio documents no fixed character ceiling. Service-side limits stay service-side
|
|
16
|
+
// instead of becoming an invented model constraint in Author Source.
|
|
17
|
+
const spokenText = { kind: "text" } as const;
|
|
18
|
+
const voiceDescription = { kind: "text" } as const;
|
|
19
|
+
|
|
20
|
+
function table(model: FishAudioSpeechModel): GenerationPortTable {
|
|
21
|
+
if (model === "voice-design-1") {
|
|
22
|
+
return sealGenerationPortTable({
|
|
23
|
+
model,
|
|
24
|
+
result: "audio",
|
|
25
|
+
ports: [
|
|
26
|
+
{ name: "text", value: spokenText, minItems: 1, maxItems: 1 },
|
|
27
|
+
{ name: "voiceDescription", value: voiceDescription, minItems: 1, maxItems: 1 },
|
|
28
|
+
],
|
|
29
|
+
requires: [],
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
return sealGenerationPortTable({
|
|
33
|
+
model,
|
|
34
|
+
result: "audio",
|
|
35
|
+
ports: [
|
|
36
|
+
{ name: "text", value: spokenText, minItems: 1, maxItems: 1 },
|
|
37
|
+
{ name: "voiceReference", value: { kind: "media", accepts: ["audio"] }, minItems: 1, maxItems: 1 },
|
|
38
|
+
],
|
|
39
|
+
requires: [],
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const fishAudioSpeechPorts: Readonly<Record<FishAudioSpeechModel, GenerationPortTable>> = {
|
|
44
|
+
"voice-design-1": table("voice-design-1"),
|
|
45
|
+
"voice-clone": table("voice-clone"),
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
export function sealFishAudioSpeechRequest(
|
|
49
|
+
model: FishAudioSpeechModel,
|
|
50
|
+
ports: Readonly<Record<string, readonly GenerationPortValue[]>>,
|
|
51
|
+
): GenerationRequest {
|
|
52
|
+
return sealGenerationPortRequest(fishAudioSpeechPorts[model], ports);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export function sealFishAudioSpeechRequestDraft(
|
|
56
|
+
model: FishAudioSpeechModel,
|
|
57
|
+
ports: Readonly<Record<string, readonly GenerationPortValue[]>>,
|
|
58
|
+
) {
|
|
59
|
+
return sealGenerationRequestDraft(fishAudioSpeechPorts[model], ports);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const base = defineExactModelModule({
|
|
63
|
+
module: fishAudioSpeechModuleRef,
|
|
64
|
+
endpoints: ([
|
|
65
|
+
["voiceDesign", "voice-design-1", "FishAudioVoiceDesignRequest"],
|
|
66
|
+
["voiceClone", "voice-clone", "FishAudioVoiceCloneRequest"],
|
|
67
|
+
] as const).map(([key, model, requestTypeName]) => ({
|
|
68
|
+
key,
|
|
69
|
+
requestTypeName,
|
|
70
|
+
producerName: `request-${model}`,
|
|
71
|
+
ports: fishAudioSpeechPorts[model],
|
|
72
|
+
})),
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export const fishAudioSpeechEndpoints = base.endpoints;
|
|
76
|
+
|
|
77
|
+
const spokenAttributes: readonly SurfaceAttributeVocabulary[] = [
|
|
78
|
+
{
|
|
79
|
+
name: "id",
|
|
80
|
+
kind: "identifier",
|
|
81
|
+
required: true,
|
|
82
|
+
summary: "Names this speech request and prefixes the binding it publishes.",
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: "speech",
|
|
86
|
+
kind: "reference",
|
|
87
|
+
required: true,
|
|
88
|
+
summary: "The Text edge whose exact words are spoken.",
|
|
89
|
+
accepts: [textTypes.text],
|
|
90
|
+
},
|
|
91
|
+
];
|
|
92
|
+
|
|
93
|
+
const referencePort: readonly SurfacePortVocabulary[] = [{
|
|
94
|
+
name: "reference",
|
|
95
|
+
type: artifactTypes.blob,
|
|
96
|
+
summary: "The designed voice reference, addressed as `<id>.reference`.",
|
|
97
|
+
}];
|
|
98
|
+
|
|
99
|
+
const audioPort: readonly SurfacePortVocabulary[] = [{
|
|
100
|
+
name: "audio",
|
|
101
|
+
type: artifactTypes.blob,
|
|
102
|
+
summary: "The independent speech, addressed as `<id>.audio`.",
|
|
103
|
+
}];
|
|
104
|
+
|
|
105
|
+
export const fishAudioSpeechMarkupSurfaces = [
|
|
106
|
+
{
|
|
107
|
+
name: "voiceDesign", tag: "VoiceDesign", mode: "structured",
|
|
108
|
+
outputs: [fishAudioSpeechEndpoints.voiceDesign.draftType],
|
|
109
|
+
vocabulary: {
|
|
110
|
+
summary: "Creates a reusable voice reference from a natural-language voice description.",
|
|
111
|
+
attributes: spokenAttributes,
|
|
112
|
+
ports: referencePort,
|
|
113
|
+
text: "The element's own text is the voice description and is required.",
|
|
114
|
+
example: `<fish:VoiceDesign id="host" speech={story.segment.voiceSample.speech}>
|
|
115
|
+
A clear young woman with a grounded, confident conversational delivery.
|
|
116
|
+
</fish:VoiceDesign>`,
|
|
117
|
+
notes: [
|
|
118
|
+
"The element accepts no child elements; only its text is read.",
|
|
119
|
+
"The result is an ordinary audio Resource that can be supplied anywhere an audio reference is accepted.",
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
name: "voiceClone", tag: "VoiceClone", mode: "structured",
|
|
125
|
+
outputs: [
|
|
126
|
+
fishAudioSpeechEndpoints.voiceClone.draftType,
|
|
127
|
+
...Object.values(fishAudioSpeechEndpoints.voiceClone.mediaBindings).map((binding) => binding.type),
|
|
128
|
+
],
|
|
129
|
+
vocabulary: {
|
|
130
|
+
summary: "Creates independent speech in the voice heard in one accepted audio reference.",
|
|
131
|
+
attributes: [
|
|
132
|
+
...spokenAttributes,
|
|
133
|
+
{
|
|
134
|
+
name: "voice",
|
|
135
|
+
kind: "reference",
|
|
136
|
+
required: true,
|
|
137
|
+
summary: "The audio Resource carrying the voice identity to reproduce.",
|
|
138
|
+
accepts: [artifactTypes.blob],
|
|
139
|
+
},
|
|
140
|
+
],
|
|
141
|
+
ports: audioPort,
|
|
142
|
+
example: `<fish:VoiceClone id="narration" speech={story.segment.reveal.speech} voice={host.reference}/>`,
|
|
143
|
+
notes: [
|
|
144
|
+
"The element takes its spoken words from speech and voice identity from voice; it has no body input.",
|
|
145
|
+
"The voice reference remains a normal audio Resource rather than a separate identity record.",
|
|
146
|
+
],
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
] as const;
|
|
150
|
+
|
|
151
|
+
export const fishAudioSpeechManifest = { ...base.manifest } as const;
|
|
152
|
+
export const fishAudioSpeechComponent = base.component;
|
|
153
|
+
export const fishAudioSpeechDefinition = { ...base, manifest: fishAudioSpeechManifest };
|
|
154
|
+
|
|
155
|
+
export { createFishAudioSpeechAudioFragment } from "./fragment.js";
|
|
156
|
+
export { decodeFishAudioVoiceCloneSurface, decodeFishAudioVoiceDesignSurface } from "./surface.js";
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { artifactTypes } from "@hypit/artifact";
|
|
2
|
+
import { generationPort, sealGenerationMediaBinding } from "@hypit/generation";
|
|
3
|
+
import type { GenerationMediaPort } from "@hypit/generation";
|
|
4
|
+
import { exactModelMediaInputNames, exactModelTextInputName } from "@hypit/model-kit";
|
|
5
|
+
import type { ExactModelEndpoint, ExactModelMediaInput, ExactModelTextInput } from "@hypit/model-kit";
|
|
6
|
+
import type { CanonicalValue } from "@hypit/protocol";
|
|
7
|
+
import { textTypes, verifyText } from "@hypit/text";
|
|
8
|
+
import type {
|
|
9
|
+
MarkupAttributeValue,
|
|
10
|
+
StructuredElement,
|
|
11
|
+
StructuredSurfaceHandler,
|
|
12
|
+
SurfaceResolvedReference,
|
|
13
|
+
} from "@hypit/markup";
|
|
14
|
+
|
|
15
|
+
import { createFishAudioSpeechAudioFragment } from "./fragment.js";
|
|
16
|
+
import { fishAudioSpeechEndpoints, sealFishAudioSpeechRequestDraft } from "./index.js";
|
|
17
|
+
|
|
18
|
+
function sameType(left: SurfaceResolvedReference["type"], right: SurfaceResolvedReference["type"]): boolean {
|
|
19
|
+
return left.module.name === right.module.name && left.module.version === right.module.version && left.name === right.name;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function attributes(element: StructuredElement, required: readonly string[]): void {
|
|
23
|
+
const allowed = new Set(required);
|
|
24
|
+
const unknown = Object.keys(element.attributes).filter((name) => !allowed.has(name));
|
|
25
|
+
if (unknown.length > 0 || required.some((name) => element.attributes[name] === undefined)) {
|
|
26
|
+
throw new Error(`${element.name} requires ${required.join(", ")}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function stringAttribute(element: StructuredElement, name: string): string {
|
|
31
|
+
const value = element.attributes[name];
|
|
32
|
+
if (typeof value !== "string" || value.trim().length === 0) {
|
|
33
|
+
throw new Error(`${element.name}.${name} must be a non-empty string`);
|
|
34
|
+
}
|
|
35
|
+
return value.trim();
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function referencePath(element: StructuredElement, name: string): string {
|
|
39
|
+
const value: MarkupAttributeValue | undefined = element.attributes[name];
|
|
40
|
+
if (typeof value !== "object" || value.kind !== "reference" || value.path.length === 0) {
|
|
41
|
+
throw new Error(`${element.name}.${name} must be a whole-value reference`);
|
|
42
|
+
}
|
|
43
|
+
return value.path;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function resolved(
|
|
47
|
+
element: StructuredElement,
|
|
48
|
+
name: string,
|
|
49
|
+
resolveReference: (path: string) => SurfaceResolvedReference | undefined,
|
|
50
|
+
): SurfaceResolvedReference {
|
|
51
|
+
const path = referencePath(element, name);
|
|
52
|
+
const value = resolveReference(path);
|
|
53
|
+
if (value === undefined) throw new Error(`${element.name}.${name} cannot resolve ${path}`);
|
|
54
|
+
return value;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
function speechText(reference: SurfaceResolvedReference, subject: string): SurfaceResolvedReference {
|
|
58
|
+
if (!sameType(reference.type, textTypes.text)) throw new Error(`${subject} must reference Text`);
|
|
59
|
+
const value = reference.record?.value;
|
|
60
|
+
if (value !== undefined) {
|
|
61
|
+
if (value.kind !== "inline") throw new Error(`${subject} has an invalid authored Text value`);
|
|
62
|
+
verifyText(value.value);
|
|
63
|
+
}
|
|
64
|
+
return reference;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function voiceReference(reference: SurfaceResolvedReference, subject: string): SurfaceResolvedReference {
|
|
68
|
+
if (!sameType(reference.type, artifactTypes.blob)) throw new Error(`${subject} must reference an audio Resource`);
|
|
69
|
+
const value = reference.record?.value;
|
|
70
|
+
if (value !== undefined && (value.kind !== "blob" || !value.mediaType.startsWith("audio/"))) {
|
|
71
|
+
throw new Error(`${subject} must reference audio media`);
|
|
72
|
+
}
|
|
73
|
+
return reference;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function body(element: StructuredElement): string {
|
|
77
|
+
if (element.children.some((child) => child.kind === "element")) {
|
|
78
|
+
throw new Error(`${element.name} accepts instruction text only`);
|
|
79
|
+
}
|
|
80
|
+
const lines = element.children.map((child) => child.kind === "text" ? child.value : "").join("")
|
|
81
|
+
.replaceAll("\r\n", "\n").split("\n");
|
|
82
|
+
while (lines[0]?.trim() === "") lines.shift();
|
|
83
|
+
while (lines.at(-1)?.trim() === "") lines.pop();
|
|
84
|
+
const indents = lines.filter((line) => line.trim()).map((line) => /^\s*/u.exec(line)?.[0].length ?? 0);
|
|
85
|
+
const indent = indents.length === 0 ? 0 : Math.min(...indents);
|
|
86
|
+
const value = lines.map((line) => line.slice(indent).trimEnd()).join("\n").trim();
|
|
87
|
+
if (value.length === 0) {
|
|
88
|
+
throw new Error(`${element.name} requires a voice description in its body`);
|
|
89
|
+
}
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
function output(
|
|
94
|
+
element: StructuredElement,
|
|
95
|
+
endpoint: ExactModelEndpoint,
|
|
96
|
+
draft: ReturnType<typeof sealFishAudioSpeechRequestDraft>,
|
|
97
|
+
outputName: "reference" | "audio",
|
|
98
|
+
text: readonly { readonly input: ExactModelTextInput; readonly source: SurfaceResolvedReference }[],
|
|
99
|
+
media: readonly { readonly input: ExactModelMediaInput; readonly source: SurfaceResolvedReference }[] = [],
|
|
100
|
+
) {
|
|
101
|
+
const id = stringAttribute(element, "id");
|
|
102
|
+
const draftId = `${id}.draft`;
|
|
103
|
+
const records: Array<{
|
|
104
|
+
readonly id: string;
|
|
105
|
+
readonly type: SurfaceResolvedReference["type"];
|
|
106
|
+
readonly value: { readonly kind: "inline"; readonly value: CanonicalValue };
|
|
107
|
+
readonly range: StructuredElement["range"];
|
|
108
|
+
}> = [{
|
|
109
|
+
id: draftId,
|
|
110
|
+
type: endpoint.draftType,
|
|
111
|
+
value: { kind: "inline", value: draft as unknown as CanonicalValue },
|
|
112
|
+
range: element.range,
|
|
113
|
+
}];
|
|
114
|
+
const inputs: Record<string, SurfaceResolvedReference["ref"] | { readonly kind: "record"; readonly id: string }> = {
|
|
115
|
+
draft: { kind: "record", id: draftId },
|
|
116
|
+
};
|
|
117
|
+
for (const item of text) inputs[exactModelTextInputName(item.input.name)] = item.source.ref;
|
|
118
|
+
for (const item of media) {
|
|
119
|
+
const binding = endpoint.mediaBindings[item.input.port];
|
|
120
|
+
if (binding === undefined) throw new Error(`${endpoint.ports.model} has no media port ${item.input.port}`);
|
|
121
|
+
const port = generationPort(endpoint.ports, item.input.port);
|
|
122
|
+
if (port.value.kind !== "media") throw new Error(`${endpoint.ports.model} port ${item.input.port} is not media`);
|
|
123
|
+
const names = exactModelMediaInputNames(item.input.name);
|
|
124
|
+
const bindingId = `${id}.${item.input.name}.binding`;
|
|
125
|
+
records.push({
|
|
126
|
+
id: bindingId,
|
|
127
|
+
type: binding.type,
|
|
128
|
+
value: {
|
|
129
|
+
kind: "inline",
|
|
130
|
+
value: sealGenerationMediaBinding(port as GenerationMediaPort, { role: "audio" }) as unknown as CanonicalValue,
|
|
131
|
+
},
|
|
132
|
+
range: element.range,
|
|
133
|
+
});
|
|
134
|
+
inputs[names.binding] = { kind: "record", id: bindingId };
|
|
135
|
+
inputs[names.artifact] = item.source.ref;
|
|
136
|
+
}
|
|
137
|
+
const fragment = createFishAudioSpeechAudioFragment(
|
|
138
|
+
endpoint,
|
|
139
|
+
media.map((item) => item.input),
|
|
140
|
+
text.map((item) => item.input),
|
|
141
|
+
);
|
|
142
|
+
return {
|
|
143
|
+
records,
|
|
144
|
+
components: [{
|
|
145
|
+
id,
|
|
146
|
+
fragment: fragment.id,
|
|
147
|
+
inputs,
|
|
148
|
+
outputs: { audio: `${id}.${outputName}` },
|
|
149
|
+
range: element.range,
|
|
150
|
+
}],
|
|
151
|
+
fragments: [fragment],
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function speechInput(
|
|
156
|
+
element: StructuredElement,
|
|
157
|
+
resolveReference: (path: string) => SurfaceResolvedReference | undefined,
|
|
158
|
+
) {
|
|
159
|
+
return {
|
|
160
|
+
input: { name: "speech", port: "text" },
|
|
161
|
+
source: speechText(resolved(element, "speech", resolveReference), `${element.name}.speech`),
|
|
162
|
+
} as const;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export const decodeFishAudioVoiceDesignSurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {
|
|
166
|
+
attributes(element, ["id", "speech"]);
|
|
167
|
+
return output(
|
|
168
|
+
element,
|
|
169
|
+
fishAudioSpeechEndpoints.voiceDesign,
|
|
170
|
+
sealFishAudioSpeechRequestDraft("voice-design-1", { voiceDescription: [body(element)] }),
|
|
171
|
+
"reference",
|
|
172
|
+
[speechInput(element, resolveReference)],
|
|
173
|
+
);
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export const decodeFishAudioVoiceCloneSurface: StructuredSurfaceHandler = ({ element, resolveReference }) => {
|
|
177
|
+
attributes(element, ["id", "speech", "voice"]);
|
|
178
|
+
if (element.children.some((child) => child.kind === "element" || child.value.trim().length > 0)) {
|
|
179
|
+
throw new Error(`${element.name} accepts speech and voice references, with no body input`);
|
|
180
|
+
}
|
|
181
|
+
return output(
|
|
182
|
+
element,
|
|
183
|
+
fishAudioSpeechEndpoints.voiceClone,
|
|
184
|
+
sealFishAudioSpeechRequestDraft("voice-clone", {}),
|
|
185
|
+
"audio",
|
|
186
|
+
[speechInput(element, resolveReference)],
|
|
187
|
+
[{
|
|
188
|
+
input: { name: "voice", port: "voiceReference" },
|
|
189
|
+
source: voiceReference(resolved(element, "voice", resolveReference), `${element.name}.voice`),
|
|
190
|
+
}],
|
|
191
|
+
);
|
|
192
|
+
};
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# `@hypit/fonts-open`
|
|
2
2
|
|
|
3
|
+
The optional `@hypit/fonts-open/studio` export supplies data-only catalog choices for Companions.
|
|
4
|
+
`openFontStudioFields(owner)` returns the explicit nested font binding and Inspector fields for a
|
|
5
|
+
Style reference such as `program` or `style`. It edits the referenced catalog face's family, keeping
|
|
6
|
+
its authored weight, style and fallback faces. Ordinary font validation still applies.
|
|
7
|
+
|
|
3
8
|
Workspace package exposing 109 redistributable open font families as exact,
|
|
4
9
|
Resource-backed `FontArtifactRef` values. The installed packages carry their font bytes and license
|
|
5
10
|
files. Author compilation and rendering never download fonts or inspect system font directories.
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
"private": true,
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
|
-
".": "./src/index.ts"
|
|
8
|
+
".": "./src/index.ts",
|
|
9
|
+
"./studio": "./src/studio.ts"
|
|
9
10
|
},
|
|
10
11
|
"hypit": {
|
|
11
12
|
"activation": "./src/activation.ts"
|
|
@@ -126,5 +127,8 @@
|
|
|
126
127
|
"@hypit/package-loader-node": "workspace:*",
|
|
127
128
|
"@hypit/protocol": "workspace:*",
|
|
128
129
|
"@hypit/markup": "workspace:*"
|
|
130
|
+
},
|
|
131
|
+
"devDependencies": {
|
|
132
|
+
"@hypit/studio-adapter": "workspace:*"
|
|
129
133
|
}
|
|
130
134
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { StudioInspectorFieldDeclaration, StudioSourceBindingDeclaration } from "@hypit/studio-adapter";
|
|
2
|
+
import { openFontFamilies } from "./catalog.js";
|
|
3
|
+
|
|
4
|
+
/** Optional Companion declarations for the primary catalog face reached through a Style's font. */
|
|
5
|
+
export function openFontStudioFields(owner: string): {
|
|
6
|
+
readonly binding: StudioSourceBindingDeclaration;
|
|
7
|
+
readonly fields: readonly StudioInspectorFieldDeclaration[];
|
|
8
|
+
} {
|
|
9
|
+
return {
|
|
10
|
+
binding: { name: "font", referenced: [{ name: "family", writable: true }] },
|
|
11
|
+
fields: [{
|
|
12
|
+
binding: `${owner}.font.family`, label: "Font Family", domain: "how",
|
|
13
|
+
page: { id: "font", label: "Font" }, section: { id: "face", label: "Primary Face" },
|
|
14
|
+
summary: "Changes the shared catalog face. Its authored weight and style must be available in the selected family.",
|
|
15
|
+
control: "select",
|
|
16
|
+
options: Object.entries(openFontFamilies).map(([value, family]) => ({
|
|
17
|
+
value, label: family.label, description: `${family.category} · ${family.intendedUse}`,
|
|
18
|
+
})),
|
|
19
|
+
}],
|
|
20
|
+
};
|
|
21
|
+
}
|
|
@@ -15,5 +15,15 @@ schemas, validators and graph facets. Generated sets are atomic Products: a Prov
|
|
|
15
15
|
returned bytes in an ResourceStore and returns typed Blob references rather than transient URLs.
|
|
16
16
|
|
|
17
17
|
This package does not choose a model, Provider, credential, queue or retry policy. Model packages
|
|
18
|
-
declare exact request Capabilities; Endpoint packages
|
|
18
|
+
declare exact request Capabilities; selected Endpoint packages implement those
|
|
19
19
|
Capabilities in a selected Runtime Profile.
|
|
20
|
+
|
|
21
|
+
## Reference fields in resource transport
|
|
22
|
+
|
|
23
|
+
A service may consume per-media metadata while preparing a URL rather than in its generation JSON.
|
|
24
|
+
Media wire mappings (`url`, `urlArray`, `itemObject`) may declare `resourceFields: ["fieldName"]`.
|
|
25
|
+
`compileWireRequest` supplies those present item fields as the second argument to its URL resolver;
|
|
26
|
+
`itemObject.fieldKeys` separately maps fields into the generation body. Port coverage checks both
|
|
27
|
+
paths against the declared media fields. False, zero and empty strings remain values; omitted fields
|
|
28
|
+
remain absent. The resolver implements the service protocol; this package knows no particular
|
|
29
|
+
service or classification. Providers using custom transports carry those fields through that boundary.
|