@qvac/inference 0.19.1 → 0.20.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.
Files changed (137) hide show
  1. package/NOTICE +43 -11
  2. package/dist/api/audio-gen.d.ts +42 -1
  3. package/dist/api/audio-gen.js +137 -51
  4. package/dist/api/index.d.ts +2 -1
  5. package/dist/api/index.js +2 -1
  6. package/dist/api/text-to-speech.d.ts +31 -4
  7. package/dist/api/text-to-speech.js +117 -21
  8. package/dist/api/vector-index.d.ts +142 -0
  9. package/dist/api/vector-index.js +168 -0
  10. package/dist/api/world.d.ts +2 -2
  11. package/dist/errors/index.d.ts +12 -0
  12. package/dist/errors/index.js +21 -0
  13. package/dist/handlers/vector-index.d.ts +2 -0
  14. package/dist/handlers/vector-index.js +40 -0
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.js +1 -1
  17. package/dist/models/registry/models.d.ts +351 -12
  18. package/dist/models/registry/models.js +2271 -1957
  19. package/dist/models/registry/resource-profiles.js +135 -0
  20. package/dist/plugins/builtin/audiogen-ggml/ops/audio-edit-stream.d.ts +2 -0
  21. package/dist/plugins/builtin/audiogen-ggml/ops/audio-edit-stream.js +65 -0
  22. package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-input.d.ts +9 -1
  23. package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-input.js +24 -7
  24. package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-run.d.ts +46 -0
  25. package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-run.js +218 -0
  26. package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.d.ts +1 -1
  27. package/dist/plugins/builtin/audiogen-ggml/ops/audio-gen-stream.js +56 -225
  28. package/dist/plugins/builtin/audiogen-ggml/ops/audio-understand.d.ts +8 -0
  29. package/dist/plugins/builtin/audiogen-ggml/ops/audio-understand.js +28 -0
  30. package/dist/plugins/builtin/audiogen-ggml/plugin.d.ts +248 -0
  31. package/dist/plugins/builtin/audiogen-ggml/plugin.js +17 -1
  32. package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.d.ts +5 -2
  33. package/dist/plugins/builtin/bci-whispercpp-transcription/plugin.js +1 -2
  34. package/dist/plugins/builtin/ggml-ocr/plugin.d.ts +1 -1
  35. package/dist/plugins/builtin/ggml-ocr/plugin.js +1 -2
  36. package/dist/plugins/builtin/llamacpp-completion/ops/batch-completion-stream.js +6 -4
  37. package/dist/plugins/builtin/llamacpp-completion/ops/cache-logger.d.ts +1 -2
  38. package/dist/plugins/builtin/llamacpp-completion/ops/cache-logger.js +0 -4
  39. package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.d.ts +1 -0
  40. package/dist/plugins/builtin/llamacpp-completion/ops/completion-stats.js +3 -0
  41. package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.d.ts +9 -0
  42. package/dist/plugins/builtin/llamacpp-completion/ops/completion-stream.js +96 -89
  43. package/dist/plugins/builtin/llamacpp-completion/ops/context-overflow.d.ts +0 -1
  44. package/dist/plugins/builtin/llamacpp-completion/ops/context-overflow.js +0 -31
  45. package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.d.ts +40 -24
  46. package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-session.js +187 -123
  47. package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-state.d.ts +11 -4
  48. package/dist/plugins/builtin/llamacpp-completion/ops/kv-cache-state.js +18 -16
  49. package/dist/plugins/builtin/llamacpp-completion/plugin.d.ts +8 -4
  50. package/dist/plugins/builtin/llamacpp-completion/plugin.js +1 -2
  51. package/dist/plugins/builtin/llamacpp-embedding/plugin.d.ts +1 -2
  52. package/dist/plugins/builtin/llamacpp-embedding/plugin.js +2 -38
  53. package/dist/plugins/builtin/llamacpp-embedding/transform.d.ts +9 -0
  54. package/dist/plugins/builtin/llamacpp-embedding/transform.js +42 -0
  55. package/dist/plugins/builtin/nmtcpp-translation/plugin.d.ts +1 -1
  56. package/dist/plugins/builtin/nmtcpp-translation/plugin.js +1 -2
  57. package/dist/plugins/builtin/parakeet-transcription/plugin.d.ts +1 -1
  58. package/dist/plugins/builtin/parakeet-transcription/plugin.js +1 -2
  59. package/dist/plugins/builtin/sdcpp-generation/ops/video.d.ts +1 -0
  60. package/dist/plugins/builtin/sdcpp-generation/ops/video.js +8 -2
  61. package/dist/plugins/builtin/sdcpp-generation/plugin.d.ts +9 -4
  62. package/dist/plugins/builtin/sdcpp-generation/plugin.js +51 -19
  63. package/dist/plugins/builtin/tts-ggml/ops/cancel-binding.d.ts +29 -0
  64. package/dist/plugins/builtin/tts-ggml/ops/cancel-binding.js +66 -0
  65. package/dist/plugins/builtin/tts-ggml/ops/parler-options.js +10 -0
  66. package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.d.ts +3 -5
  67. package/dist/plugins/builtin/tts-ggml/ops/text-to-speech-stream.js +143 -28
  68. package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.d.ts +5 -2
  69. package/dist/plugins/builtin/tts-ggml/ops/text-to-speech.js +182 -66
  70. package/dist/plugins/builtin/tts-ggml/plugin.d.ts +267 -22
  71. package/dist/plugins/builtin/tts-ggml/plugin.js +94 -35
  72. package/dist/plugins/builtin/whispercpp-transcription/plugin.d.ts +1 -1
  73. package/dist/plugins/builtin/whispercpp-transcription/plugin.js +1 -2
  74. package/dist/plugins/index.d.ts +1 -1
  75. package/dist/plugins/index.js +1 -1
  76. package/dist/plugins/ops/load-model.js +22 -2
  77. package/dist/plugins/ops/translate.js +58 -12
  78. package/dist/plugins/ops/translatepsy-utils.d.ts +17 -0
  79. package/dist/plugins/ops/translatepsy-utils.js +32 -0
  80. package/dist/plugins/registry.d.ts +15 -0
  81. package/dist/plugins/registry.js +133 -15
  82. package/dist/plugins/turbovec-backend.d.ts +17 -0
  83. package/dist/plugins/turbovec-backend.js +99 -0
  84. package/dist/registry.js +4 -0
  85. package/dist/resources/model-fit/native-probe/advisory-fit.d.ts +46 -0
  86. package/dist/resources/model-fit/native-probe/advisory-fit.js +214 -0
  87. package/dist/resources/model-fit/native-probe/create-llama-fit-request.d.ts +26 -0
  88. package/dist/resources/model-fit/native-probe/create-llama-fit-request.js +171 -0
  89. package/dist/resources/model-fit/native-probe/run-in-process-fit.d.ts +42 -0
  90. package/dist/resources/model-fit/native-probe/run-in-process-fit.js +192 -0
  91. package/dist/resources/model-fit/native-probe/run-isolated-fit.d.ts +70 -0
  92. package/dist/resources/model-fit/native-probe/run-isolated-fit.js +372 -0
  93. package/dist/runtime/env.d.ts +2 -0
  94. package/dist/runtime/env.js +9 -2
  95. package/dist/runtime/lifecycle.js +2 -0
  96. package/dist/runtime/model-registry.d.ts +3 -1
  97. package/dist/runtime/model-registry.js +2 -1
  98. package/dist/runtime/request-context.js +17 -0
  99. package/dist/runtime/vector-index-backend.d.ts +25 -0
  100. package/dist/runtime/vector-index-backend.js +1 -0
  101. package/dist/runtime/vector-index-registry.d.ts +76 -0
  102. package/dist/runtime/vector-index-registry.js +161 -0
  103. package/dist/schemas/assess-model-fit.d.ts +44 -0
  104. package/dist/schemas/assess-model-fit.js +40 -0
  105. package/dist/schemas/audio-gen.d.ts +479 -4
  106. package/dist/schemas/audio-gen.js +376 -17
  107. package/dist/schemas/batch-completion-stream.d.ts +7 -0
  108. package/dist/schemas/batch-completion-stream.js +5 -3
  109. package/dist/schemas/common.d.ts +749 -15
  110. package/dist/schemas/common.js +8 -1
  111. package/dist/schemas/completion-event.d.ts +11 -1
  112. package/dist/schemas/completion-event.js +3 -0
  113. package/dist/schemas/completion-stream.d.ts +20 -0
  114. package/dist/schemas/completion-stream.js +41 -4
  115. package/dist/schemas/config.d.ts +48 -30
  116. package/dist/schemas/errors.d.ts +4 -0
  117. package/dist/schemas/errors.js +22 -0
  118. package/dist/schemas/index.d.ts +1 -0
  119. package/dist/schemas/index.js +1 -0
  120. package/dist/schemas/llamacpp-config.d.ts +4 -8
  121. package/dist/schemas/llamacpp-config.js +4 -4
  122. package/dist/schemas/load-model.d.ts +2503 -139
  123. package/dist/schemas/model-config-schemas.d.ts +228 -5
  124. package/dist/schemas/plugin.d.ts +10 -0
  125. package/dist/schemas/sdcpp-config.d.ts +221 -4
  126. package/dist/schemas/sdcpp-config.js +128 -22
  127. package/dist/schemas/text-to-speech.d.ts +780 -19
  128. package/dist/schemas/text-to-speech.js +298 -44
  129. package/dist/schemas/transcription-config.js +7 -4
  130. package/dist/schemas/vector-index.d.ts +194 -0
  131. package/dist/schemas/vector-index.js +185 -0
  132. package/dist/utils/addon-responses.d.ts +29 -3
  133. package/dist/utils/aggregate-events.d.ts +3 -1
  134. package/dist/utils/aggregate-events.js +7 -1
  135. package/dist/utils/tts-stats.d.ts +15 -11
  136. package/dist/utils/tts-stats.js +33 -11
  137. package/package.json +28 -25
@@ -15,17 +15,55 @@ export declare const AUDIOGEN_INPUT_CHANNELS = 2;
15
15
  * 384 KB per second — so a request cannot exhaust the inference process.
16
16
  */
17
17
  export declare const AUDIOGEN_INPUT_MAX_SECONDS = 600;
18
+ /** Longest `audioCodes` array the SDK accepts (600 s at 5 codes per second). */
19
+ export declare const AUDIOGEN_MAX_AUDIO_CODES: number;
20
+ /**
21
+ * Operations `audioEdit()` chains over a source recording, in the vocabulary
22
+ * of `@qvac/audiogen-ggml`'s `AudioEditOperationType` (ACE-Step only):
23
+ * `flow-edit` re-conditions the whole clip from a source prompt to a target
24
+ * prompt, `repaint` regenerates a time range against a new prompt.
25
+ */
26
+ export declare const AUDIOGEN_EDIT_OPERATIONS: readonly ["flow-edit", "repaint"];
27
+ export declare const audioGenEditOperationTypeSchema: z.ZodEnum<{
28
+ "flow-edit": "flow-edit";
29
+ repaint: "repaint";
30
+ }>;
31
+ /** Repaint preservation modes; `balanced` is the default and honours `strength`. */
32
+ export declare const AUDIOGEN_REPAINT_MODES: readonly ["conservative", "balanced", "aggressive"];
33
+ export declare const audioGenRepaintModeSchema: z.ZodEnum<{
34
+ conservative: "conservative";
35
+ balanced: "balanced";
36
+ aggressive: "aggressive";
37
+ }>;
18
38
  /**
19
39
  * ACE-Step task discriminators reachable through the SDK. `text2music` is the
20
40
  * default caption-driven generation; `cover-nofsq` re-renders `sourceAudio`
21
- * with a new caption while keeping its structure. The engine also reserves an
22
- * FSQ-roundtrip `cover` task that is not implemented yet, so it is not offered
23
- * here.
41
+ * with a new caption while keeping its structure; `lego` regenerates a single
42
+ * instrument layer of `sourceAudio`, named by `track`. The engine also
43
+ * reserves an FSQ-roundtrip `cover` task that is not implemented yet, so it is
44
+ * not offered here.
24
45
  */
25
- export declare const AUDIOGEN_TASK_TYPES: readonly ["text2music", "cover-nofsq"];
46
+ export declare const AUDIOGEN_TASK_TYPES: readonly ["text2music", "cover-nofsq", "lego"];
26
47
  export declare const audioGenTaskTypeSchema: z.ZodEnum<{
27
48
  text2music: "text2music";
28
49
  "cover-nofsq": "cover-nofsq";
50
+ lego: "lego";
51
+ }>;
52
+ /** Instrument layers the `lego` task can target, in the engine's vocabulary. */
53
+ export declare const AUDIOGEN_TRACKS: readonly ["vocals", "backing_vocals", "drums", "bass", "guitar", "keyboard", "percussion", "strings", "synth", "fx", "brass", "woodwinds"];
54
+ export declare const audioGenTrackSchema: z.ZodEnum<{
55
+ vocals: "vocals";
56
+ backing_vocals: "backing_vocals";
57
+ drums: "drums";
58
+ bass: "bass";
59
+ guitar: "guitar";
60
+ keyboard: "keyboard";
61
+ percussion: "percussion";
62
+ strings: "strings";
63
+ synth: "synth";
64
+ fx: "fx";
65
+ brass: "brass";
66
+ woodwinds: "woodwinds";
29
67
  }>;
30
68
  declare const acestepAudioGenRuntimeConfigSchema: z.ZodObject<{
31
69
  inferenceSteps: z.ZodOptional<z.ZodNumber>;
@@ -584,7 +622,13 @@ export declare const audioGenClientAudioInputSchema: z.ZodPipe<z.ZodUnion<readon
584
622
  type: "filePath";
585
623
  value: string;
586
624
  }, string | Uint8Array<ArrayBuffer>>>;
625
+ /**
626
+ * Client form of `audioCodes`: the `Int32Array` the addon works with, or a
627
+ * plain number array. Normalized to the wire form.
628
+ */
629
+ export declare const audioGenClientAudioCodesSchema: z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodInstanceOf<Int32Array<ArrayBuffer>>, z.ZodTransform<number[], Int32Array<ArrayBuffer>>>, z.ZodArray<z.ZodNumber>]>, z.ZodArray<z.ZodNumber>>;
587
630
  export declare const audioGenClientParamsSchema: z.ZodObject<{
631
+ audioCodes: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodPipe<z.ZodInstanceOf<Int32Array<ArrayBuffer>>, z.ZodTransform<number[], Int32Array<ArrayBuffer>>>, z.ZodArray<z.ZodNumber>]>, z.ZodArray<z.ZodNumber>>>;
588
632
  referenceAudio: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodInstanceOf<Uint8Array<ArrayBuffer>>]>, z.ZodTransform<{
589
633
  type: "base64";
590
634
  value: string;
@@ -607,6 +651,27 @@ export declare const audioGenClientParamsSchema: z.ZodObject<{
607
651
  bpm: z.ZodOptional<z.ZodNumber>;
608
652
  keyscale: z.ZodOptional<z.ZodString>;
609
653
  timesignature: z.ZodOptional<z.ZodString>;
654
+ augmentCaptionWithMetadata: z.ZodOptional<z.ZodBoolean>;
655
+ simpleMode: z.ZodOptional<z.ZodBoolean>;
656
+ rewriteQuery: z.ZodOptional<z.ZodBoolean>;
657
+ generateLrc: z.ZodOptional<z.ZodBoolean>;
658
+ computeQualityScore: z.ZodOptional<z.ZodBoolean>;
659
+ normalizeLoudness: z.ZodOptional<z.ZodBoolean>;
660
+ guidanceScale: z.ZodOptional<z.ZodNumber>;
661
+ track: z.ZodOptional<z.ZodEnum<{
662
+ vocals: "vocals";
663
+ backing_vocals: "backing_vocals";
664
+ drums: "drums";
665
+ bass: "bass";
666
+ guitar: "guitar";
667
+ keyboard: "keyboard";
668
+ percussion: "percussion";
669
+ strings: "strings";
670
+ synth: "synth";
671
+ fx: "fx";
672
+ brass: "brass";
673
+ woodwinds: "woodwinds";
674
+ }>>;
610
675
  duration: z.ZodOptional<z.ZodNumber>;
611
676
  maxFrames: z.ZodOptional<z.ZodNumber>;
612
677
  inferenceSteps: z.ZodOptional<z.ZodNumber>;
@@ -622,6 +687,7 @@ export declare const audioGenClientParamsSchema: z.ZodObject<{
622
687
  taskType: z.ZodOptional<z.ZodEnum<{
623
688
  text2music: "text2music";
624
689
  "cover-nofsq": "cover-nofsq";
690
+ lego: "lego";
625
691
  }>>;
626
692
  audioCoverStrength: z.ZodOptional<z.ZodNumber>;
627
693
  coverNoiseStrength: z.ZodOptional<z.ZodNumber>;
@@ -629,6 +695,7 @@ export declare const audioGenClientParamsSchema: z.ZodObject<{
629
695
  export declare const audioGenStreamRequestSchema: z.ZodObject<{
630
696
  type: z.ZodLiteral<"audioGenStream">;
631
697
  requestId: z.ZodOptional<z.ZodString>;
698
+ audioCodes: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
632
699
  referenceAudio: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
633
700
  type: z.ZodLiteral<"base64">;
634
701
  value: z.ZodString;
@@ -651,6 +718,27 @@ export declare const audioGenStreamRequestSchema: z.ZodObject<{
651
718
  bpm: z.ZodOptional<z.ZodNumber>;
652
719
  keyscale: z.ZodOptional<z.ZodString>;
653
720
  timesignature: z.ZodOptional<z.ZodString>;
721
+ augmentCaptionWithMetadata: z.ZodOptional<z.ZodBoolean>;
722
+ simpleMode: z.ZodOptional<z.ZodBoolean>;
723
+ rewriteQuery: z.ZodOptional<z.ZodBoolean>;
724
+ generateLrc: z.ZodOptional<z.ZodBoolean>;
725
+ computeQualityScore: z.ZodOptional<z.ZodBoolean>;
726
+ normalizeLoudness: z.ZodOptional<z.ZodBoolean>;
727
+ guidanceScale: z.ZodOptional<z.ZodNumber>;
728
+ track: z.ZodOptional<z.ZodEnum<{
729
+ vocals: "vocals";
730
+ backing_vocals: "backing_vocals";
731
+ drums: "drums";
732
+ bass: "bass";
733
+ guitar: "guitar";
734
+ keyboard: "keyboard";
735
+ percussion: "percussion";
736
+ strings: "strings";
737
+ synth: "synth";
738
+ fx: "fx";
739
+ brass: "brass";
740
+ woodwinds: "woodwinds";
741
+ }>>;
654
742
  duration: z.ZodOptional<z.ZodNumber>;
655
743
  maxFrames: z.ZodOptional<z.ZodNumber>;
656
744
  inferenceSteps: z.ZodOptional<z.ZodNumber>;
@@ -666,10 +754,144 @@ export declare const audioGenStreamRequestSchema: z.ZodObject<{
666
754
  taskType: z.ZodOptional<z.ZodEnum<{
667
755
  text2music: "text2music";
668
756
  "cover-nofsq": "cover-nofsq";
757
+ lego: "lego";
669
758
  }>>;
670
759
  audioCoverStrength: z.ZodOptional<z.ZodNumber>;
671
760
  coverNoiseStrength: z.ZodOptional<z.ZodNumber>;
672
761
  }, z.core.$strict>;
762
+ declare const audioEditPromptSchema: z.ZodObject<{
763
+ caption: z.ZodString;
764
+ lyrics: z.ZodOptional<z.ZodString>;
765
+ }, z.core.$strict>;
766
+ export declare const audioEditFlowEditOperationSchema: z.ZodObject<{
767
+ type: z.ZodLiteral<"flow-edit">;
768
+ from: z.ZodObject<{
769
+ caption: z.ZodString;
770
+ lyrics: z.ZodOptional<z.ZodString>;
771
+ }, z.core.$strict>;
772
+ to: z.ZodObject<{
773
+ caption: z.ZodString;
774
+ lyrics: z.ZodOptional<z.ZodString>;
775
+ }, z.core.$strict>;
776
+ nMin: z.ZodOptional<z.ZodNumber>;
777
+ nMax: z.ZodOptional<z.ZodNumber>;
778
+ nAvg: z.ZodOptional<z.ZodNumber>;
779
+ }, z.core.$strict>;
780
+ export declare const audioEditRepaintOperationSchema: z.ZodObject<{
781
+ type: z.ZodLiteral<"repaint">;
782
+ caption: z.ZodString;
783
+ lyrics: z.ZodOptional<z.ZodString>;
784
+ start: z.ZodNumber;
785
+ end: z.ZodOptional<z.ZodNumber>;
786
+ mode: z.ZodOptional<z.ZodEnum<{
787
+ conservative: "conservative";
788
+ balanced: "balanced";
789
+ aggressive: "aggressive";
790
+ }>>;
791
+ strength: z.ZodOptional<z.ZodNumber>;
792
+ }, z.core.$strict>;
793
+ export declare const audioEditOperationSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
794
+ type: z.ZodLiteral<"flow-edit">;
795
+ from: z.ZodObject<{
796
+ caption: z.ZodString;
797
+ lyrics: z.ZodOptional<z.ZodString>;
798
+ }, z.core.$strict>;
799
+ to: z.ZodObject<{
800
+ caption: z.ZodString;
801
+ lyrics: z.ZodOptional<z.ZodString>;
802
+ }, z.core.$strict>;
803
+ nMin: z.ZodOptional<z.ZodNumber>;
804
+ nMax: z.ZodOptional<z.ZodNumber>;
805
+ nAvg: z.ZodOptional<z.ZodNumber>;
806
+ }, z.core.$strict>, z.ZodObject<{
807
+ type: z.ZodLiteral<"repaint">;
808
+ caption: z.ZodString;
809
+ lyrics: z.ZodOptional<z.ZodString>;
810
+ start: z.ZodNumber;
811
+ end: z.ZodOptional<z.ZodNumber>;
812
+ mode: z.ZodOptional<z.ZodEnum<{
813
+ conservative: "conservative";
814
+ balanced: "balanced";
815
+ aggressive: "aggressive";
816
+ }>>;
817
+ strength: z.ZodOptional<z.ZodNumber>;
818
+ }, z.core.$strict>], "type">;
819
+ export declare const audioEditClientParamsSchema: z.ZodObject<{
820
+ sourceAudio: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodInstanceOf<Uint8Array<ArrayBuffer>>]>, z.ZodTransform<{
821
+ type: "base64";
822
+ value: string;
823
+ } | {
824
+ type: "filePath";
825
+ value: string;
826
+ }, string | Uint8Array<ArrayBuffer>>>;
827
+ modelId: z.ZodString;
828
+ operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
829
+ type: z.ZodLiteral<"flow-edit">;
830
+ from: z.ZodObject<{
831
+ caption: z.ZodString;
832
+ lyrics: z.ZodOptional<z.ZodString>;
833
+ }, z.core.$strict>;
834
+ to: z.ZodObject<{
835
+ caption: z.ZodString;
836
+ lyrics: z.ZodOptional<z.ZodString>;
837
+ }, z.core.$strict>;
838
+ nMin: z.ZodOptional<z.ZodNumber>;
839
+ nMax: z.ZodOptional<z.ZodNumber>;
840
+ nAvg: z.ZodOptional<z.ZodNumber>;
841
+ }, z.core.$strict>, z.ZodObject<{
842
+ type: z.ZodLiteral<"repaint">;
843
+ caption: z.ZodString;
844
+ lyrics: z.ZodOptional<z.ZodString>;
845
+ start: z.ZodNumber;
846
+ end: z.ZodOptional<z.ZodNumber>;
847
+ mode: z.ZodOptional<z.ZodEnum<{
848
+ conservative: "conservative";
849
+ balanced: "balanced";
850
+ aggressive: "aggressive";
851
+ }>>;
852
+ strength: z.ZodOptional<z.ZodNumber>;
853
+ }, z.core.$strict>], "type">>;
854
+ seed: z.ZodOptional<z.ZodNumber>;
855
+ }, z.core.$strict>;
856
+ export declare const audioEditStreamRequestSchema: z.ZodObject<{
857
+ sourceAudio: z.ZodDiscriminatedUnion<[z.ZodObject<{
858
+ type: z.ZodLiteral<"base64">;
859
+ value: z.ZodString;
860
+ }, z.core.$strip>, z.ZodObject<{
861
+ type: z.ZodLiteral<"filePath">;
862
+ value: z.ZodString;
863
+ }, z.core.$strip>], "type">;
864
+ type: z.ZodLiteral<"audioEditStream">;
865
+ requestId: z.ZodOptional<z.ZodString>;
866
+ modelId: z.ZodString;
867
+ operations: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
868
+ type: z.ZodLiteral<"flow-edit">;
869
+ from: z.ZodObject<{
870
+ caption: z.ZodString;
871
+ lyrics: z.ZodOptional<z.ZodString>;
872
+ }, z.core.$strict>;
873
+ to: z.ZodObject<{
874
+ caption: z.ZodString;
875
+ lyrics: z.ZodOptional<z.ZodString>;
876
+ }, z.core.$strict>;
877
+ nMin: z.ZodOptional<z.ZodNumber>;
878
+ nMax: z.ZodOptional<z.ZodNumber>;
879
+ nAvg: z.ZodOptional<z.ZodNumber>;
880
+ }, z.core.$strict>, z.ZodObject<{
881
+ type: z.ZodLiteral<"repaint">;
882
+ caption: z.ZodString;
883
+ lyrics: z.ZodOptional<z.ZodString>;
884
+ start: z.ZodNumber;
885
+ end: z.ZodOptional<z.ZodNumber>;
886
+ mode: z.ZodOptional<z.ZodEnum<{
887
+ conservative: "conservative";
888
+ balanced: "balanced";
889
+ aggressive: "aggressive";
890
+ }>>;
891
+ strength: z.ZodOptional<z.ZodNumber>;
892
+ }, z.core.$strict>], "type">>;
893
+ seed: z.ZodOptional<z.ZodNumber>;
894
+ }, z.core.$strict>;
673
895
  export type AudioGenProgress = {
674
896
  stage: string;
675
897
  step: number;
@@ -684,15 +906,230 @@ export declare const audioGenProgressSchema: z.ZodObject<{
684
906
  step: z.ZodNumber;
685
907
  total: z.ZodNumber;
686
908
  }, z.core.$strip>;
909
+ /**
910
+ * The LM's description of a clip, returned by `audioUnderstand()`. `audioCodes`
911
+ * are the recovered FSQ codes, reusable as a generation's `audioCodes` input.
912
+ */
913
+ export declare const audioGenUnderstandResultSchema: z.ZodObject<{
914
+ caption: z.ZodString;
915
+ bpm: z.ZodNumber;
916
+ duration: z.ZodNumber;
917
+ keyscale: z.ZodString;
918
+ timesignature: z.ZodString;
919
+ vocalLanguage: z.ZodString;
920
+ audioCodes: z.ZodArray<z.ZodNumber>;
921
+ }, z.core.$strip>;
687
922
  export declare const audioGenStatsSchema: z.ZodObject<{
688
923
  audioDurationMs: z.ZodOptional<z.ZodNumber>;
689
924
  totalTimeMs: z.ZodOptional<z.ZodNumber>;
690
925
  realTimeFactor: z.ZodOptional<z.ZodNumber>;
691
926
  backendDevice: z.ZodOptional<z.ZodNumber>;
692
927
  backendId: z.ZodOptional<z.ZodNumber>;
928
+ lyricsScore: z.ZodOptional<z.ZodNumber>;
929
+ lrc: z.ZodOptional<z.ZodString>;
930
+ qualityScore: z.ZodOptional<z.ZodNumber>;
931
+ understand: z.ZodOptional<z.ZodObject<{
932
+ caption: z.ZodString;
933
+ bpm: z.ZodNumber;
934
+ duration: z.ZodNumber;
935
+ keyscale: z.ZodString;
936
+ timesignature: z.ZodString;
937
+ vocalLanguage: z.ZodString;
938
+ audioCodes: z.ZodArray<z.ZodNumber>;
939
+ }, z.core.$strip>>;
693
940
  }, z.core.$strip>;
941
+ export declare const audioUnderstandClientParamsSchema: z.ZodObject<{
942
+ sourceAudio: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodInstanceOf<Uint8Array<ArrayBuffer>>]>, z.ZodTransform<{
943
+ type: "base64";
944
+ value: string;
945
+ } | {
946
+ type: "filePath";
947
+ value: string;
948
+ }, string | Uint8Array<ArrayBuffer>>>;
949
+ modelId: z.ZodString;
950
+ seed: z.ZodOptional<z.ZodNumber>;
951
+ vocalLanguage: z.ZodOptional<z.ZodString>;
952
+ lmTemperature: z.ZodOptional<z.ZodNumber>;
953
+ lmTopP: z.ZodOptional<z.ZodNumber>;
954
+ lmTopK: z.ZodOptional<z.ZodNumber>;
955
+ }, z.core.$strict>;
956
+ export declare const audioUnderstandRequestSchema: z.ZodObject<{
957
+ sourceAudio: z.ZodDiscriminatedUnion<[z.ZodObject<{
958
+ type: z.ZodLiteral<"base64">;
959
+ value: z.ZodString;
960
+ }, z.core.$strip>, z.ZodObject<{
961
+ type: z.ZodLiteral<"filePath">;
962
+ value: z.ZodString;
963
+ }, z.core.$strip>], "type">;
964
+ type: z.ZodLiteral<"audioUnderstand">;
965
+ requestId: z.ZodOptional<z.ZodString>;
966
+ modelId: z.ZodString;
967
+ seed: z.ZodOptional<z.ZodNumber>;
968
+ vocalLanguage: z.ZodOptional<z.ZodString>;
969
+ lmTemperature: z.ZodOptional<z.ZodNumber>;
970
+ lmTopP: z.ZodOptional<z.ZodNumber>;
971
+ lmTopK: z.ZodOptional<z.ZodNumber>;
972
+ }, z.core.$strict>;
973
+ export declare const audioUnderstandResponseSchema: z.ZodObject<{
974
+ type: z.ZodLiteral<"audioUnderstand">;
975
+ progress: z.ZodOptional<z.ZodObject<{
976
+ stage: z.ZodString;
977
+ step: z.ZodNumber;
978
+ total: z.ZodNumber;
979
+ }, z.core.$strip>>;
980
+ understand: z.ZodOptional<z.ZodObject<{
981
+ caption: z.ZodString;
982
+ bpm: z.ZodNumber;
983
+ duration: z.ZodNumber;
984
+ keyscale: z.ZodString;
985
+ timesignature: z.ZodString;
986
+ vocalLanguage: z.ZodString;
987
+ audioCodes: z.ZodArray<z.ZodNumber>;
988
+ }, z.core.$strip>>;
989
+ done: z.ZodDefault<z.ZodBoolean>;
990
+ stopReason: z.ZodOptional<z.ZodEnum<{
991
+ cancelled: "cancelled";
992
+ completed: "completed";
993
+ }>>;
994
+ stats: z.ZodOptional<z.ZodObject<{
995
+ audioDurationMs: z.ZodOptional<z.ZodNumber>;
996
+ totalTimeMs: z.ZodOptional<z.ZodNumber>;
997
+ realTimeFactor: z.ZodOptional<z.ZodNumber>;
998
+ backendDevice: z.ZodOptional<z.ZodNumber>;
999
+ backendId: z.ZodOptional<z.ZodNumber>;
1000
+ lyricsScore: z.ZodOptional<z.ZodNumber>;
1001
+ lrc: z.ZodOptional<z.ZodString>;
1002
+ qualityScore: z.ZodOptional<z.ZodNumber>;
1003
+ understand: z.ZodOptional<z.ZodObject<{
1004
+ caption: z.ZodString;
1005
+ bpm: z.ZodNumber;
1006
+ duration: z.ZodNumber;
1007
+ keyscale: z.ZodString;
1008
+ timesignature: z.ZodString;
1009
+ vocalLanguage: z.ZodString;
1010
+ audioCodes: z.ZodArray<z.ZodNumber>;
1011
+ }, z.core.$strip>>;
1012
+ }, z.core.$strip>>;
1013
+ diagnostics: z.ZodOptional<z.ZodObject<{
1014
+ selectedBackend: z.ZodString;
1015
+ selectedDevice: z.ZodEnum<{
1016
+ gpu: "gpu";
1017
+ cpu: "cpu";
1018
+ }>;
1019
+ graphicsApi: z.ZodOptional<z.ZodEnum<{
1020
+ vulkan: "vulkan";
1021
+ metal: "metal";
1022
+ opencl: "opencl";
1023
+ cuda: "cuda";
1024
+ opengl: "opengl";
1025
+ webgpu: "webgpu";
1026
+ direct3d11: "direct3d11";
1027
+ direct3d12: "direct3d12";
1028
+ levelZero: "levelZero";
1029
+ rocm: "rocm";
1030
+ }>>;
1031
+ driver: z.ZodOptional<z.ZodObject<{
1032
+ name: z.ZodString;
1033
+ version: z.ZodOptional<z.ZodString>;
1034
+ }, z.core.$strip>>;
1035
+ gpuId: z.ZodOptional<z.ZodString>;
1036
+ fallback: z.ZodOptional<z.ZodObject<{
1037
+ requestedBackend: z.ZodOptional<z.ZodString>;
1038
+ requestedDevice: z.ZodOptional<z.ZodEnum<{
1039
+ gpu: "gpu";
1040
+ cpu: "cpu";
1041
+ }>>;
1042
+ reason: z.ZodString;
1043
+ }, z.core.$strip>>;
1044
+ probe: z.ZodOptional<z.ZodObject<{
1045
+ status: z.ZodEnum<{
1046
+ unknown: "unknown";
1047
+ compatible: "compatible";
1048
+ incompatible: "incompatible";
1049
+ }>;
1050
+ backend: z.ZodString;
1051
+ reason: z.ZodOptional<z.ZodString>;
1052
+ }, z.core.$strip>>;
1053
+ }, z.core.$strip>>;
1054
+ }, z.core.$strict>;
694
1055
  export declare const audioGenStreamResponseSchema: z.ZodObject<{
1056
+ progress: z.ZodOptional<z.ZodObject<{
1057
+ stage: z.ZodString;
1058
+ step: z.ZodNumber;
1059
+ total: z.ZodNumber;
1060
+ }, z.core.$strip>>;
1061
+ data: z.ZodOptional<z.ZodString>;
1062
+ sampleRate: z.ZodOptional<z.ZodNumber>;
1063
+ channels: z.ZodOptional<z.ZodNumber>;
1064
+ bitsPerSample: z.ZodOptional<z.ZodNumber>;
1065
+ done: z.ZodDefault<z.ZodBoolean>;
1066
+ stopReason: z.ZodOptional<z.ZodEnum<{
1067
+ cancelled: "cancelled";
1068
+ completed: "completed";
1069
+ }>>;
1070
+ stats: z.ZodOptional<z.ZodObject<{
1071
+ audioDurationMs: z.ZodOptional<z.ZodNumber>;
1072
+ totalTimeMs: z.ZodOptional<z.ZodNumber>;
1073
+ realTimeFactor: z.ZodOptional<z.ZodNumber>;
1074
+ backendDevice: z.ZodOptional<z.ZodNumber>;
1075
+ backendId: z.ZodOptional<z.ZodNumber>;
1076
+ lyricsScore: z.ZodOptional<z.ZodNumber>;
1077
+ lrc: z.ZodOptional<z.ZodString>;
1078
+ qualityScore: z.ZodOptional<z.ZodNumber>;
1079
+ understand: z.ZodOptional<z.ZodObject<{
1080
+ caption: z.ZodString;
1081
+ bpm: z.ZodNumber;
1082
+ duration: z.ZodNumber;
1083
+ keyscale: z.ZodString;
1084
+ timesignature: z.ZodString;
1085
+ vocalLanguage: z.ZodString;
1086
+ audioCodes: z.ZodArray<z.ZodNumber>;
1087
+ }, z.core.$strip>>;
1088
+ }, z.core.$strip>>;
1089
+ diagnostics: z.ZodOptional<z.ZodObject<{
1090
+ selectedBackend: z.ZodString;
1091
+ selectedDevice: z.ZodEnum<{
1092
+ gpu: "gpu";
1093
+ cpu: "cpu";
1094
+ }>;
1095
+ graphicsApi: z.ZodOptional<z.ZodEnum<{
1096
+ vulkan: "vulkan";
1097
+ metal: "metal";
1098
+ opencl: "opencl";
1099
+ cuda: "cuda";
1100
+ opengl: "opengl";
1101
+ webgpu: "webgpu";
1102
+ direct3d11: "direct3d11";
1103
+ direct3d12: "direct3d12";
1104
+ levelZero: "levelZero";
1105
+ rocm: "rocm";
1106
+ }>>;
1107
+ driver: z.ZodOptional<z.ZodObject<{
1108
+ name: z.ZodString;
1109
+ version: z.ZodOptional<z.ZodString>;
1110
+ }, z.core.$strip>>;
1111
+ gpuId: z.ZodOptional<z.ZodString>;
1112
+ fallback: z.ZodOptional<z.ZodObject<{
1113
+ requestedBackend: z.ZodOptional<z.ZodString>;
1114
+ requestedDevice: z.ZodOptional<z.ZodEnum<{
1115
+ gpu: "gpu";
1116
+ cpu: "cpu";
1117
+ }>>;
1118
+ reason: z.ZodString;
1119
+ }, z.core.$strip>>;
1120
+ probe: z.ZodOptional<z.ZodObject<{
1121
+ status: z.ZodEnum<{
1122
+ unknown: "unknown";
1123
+ compatible: "compatible";
1124
+ incompatible: "incompatible";
1125
+ }>;
1126
+ backend: z.ZodString;
1127
+ reason: z.ZodOptional<z.ZodString>;
1128
+ }, z.core.$strip>>;
1129
+ }, z.core.$strip>>;
695
1130
  type: z.ZodLiteral<"audioGenStream">;
1131
+ }, z.core.$strict>;
1132
+ export declare const audioEditStreamResponseSchema: z.ZodObject<{
696
1133
  progress: z.ZodOptional<z.ZodObject<{
697
1134
  stage: z.ZodString;
698
1135
  step: z.ZodNumber;
@@ -713,6 +1150,18 @@ export declare const audioGenStreamResponseSchema: z.ZodObject<{
713
1150
  realTimeFactor: z.ZodOptional<z.ZodNumber>;
714
1151
  backendDevice: z.ZodOptional<z.ZodNumber>;
715
1152
  backendId: z.ZodOptional<z.ZodNumber>;
1153
+ lyricsScore: z.ZodOptional<z.ZodNumber>;
1154
+ lrc: z.ZodOptional<z.ZodString>;
1155
+ qualityScore: z.ZodOptional<z.ZodNumber>;
1156
+ understand: z.ZodOptional<z.ZodObject<{
1157
+ caption: z.ZodString;
1158
+ bpm: z.ZodNumber;
1159
+ duration: z.ZodNumber;
1160
+ keyscale: z.ZodString;
1161
+ timesignature: z.ZodString;
1162
+ vocalLanguage: z.ZodString;
1163
+ audioCodes: z.ZodArray<z.ZodNumber>;
1164
+ }, z.core.$strip>>;
716
1165
  }, z.core.$strip>>;
717
1166
  diagnostics: z.ZodOptional<z.ZodObject<{
718
1167
  selectedBackend: z.ZodString;
@@ -755,8 +1204,18 @@ export declare const audioGenStreamResponseSchema: z.ZodObject<{
755
1204
  reason: z.ZodOptional<z.ZodString>;
756
1205
  }, z.core.$strip>>;
757
1206
  }, z.core.$strip>>;
1207
+ type: z.ZodLiteral<"audioEditStream">;
758
1208
  }, z.core.$strict>;
759
1209
  export type AudioGenTaskType = z.infer<typeof audioGenTaskTypeSchema>;
1210
+ export type AudioGenEditOperationType = z.infer<typeof audioGenEditOperationTypeSchema>;
1211
+ export type AudioGenRepaintMode = z.infer<typeof audioGenRepaintModeSchema>;
1212
+ export type AudioEditPrompt = z.infer<typeof audioEditPromptSchema>;
1213
+ export type AudioEditFlowEditOperation = z.infer<typeof audioEditFlowEditOperationSchema>;
1214
+ export type AudioEditRepaintOperation = z.infer<typeof audioEditRepaintOperationSchema>;
1215
+ export type AudioEditOperation = z.infer<typeof audioEditOperationSchema>;
1216
+ export type AudioEditClientParams = z.input<typeof audioEditClientParamsSchema>;
1217
+ export type AudioEditStreamRequest = z.infer<typeof audioEditStreamRequestSchema>;
1218
+ export type AudioEditStreamResponse = z.infer<typeof audioEditStreamResponseSchema>;
760
1219
  export type AudioGenEngine = z.infer<typeof audioGenEngineSchema>;
761
1220
  export type AudioGenAudioInput = z.infer<typeof audioGenAudioInputSchema>;
762
1221
  export type AcestepAudioGenRuntimeConfig = z.infer<typeof acestepAudioGenRuntimeConfigSchema>;
@@ -769,6 +1228,11 @@ export type AudioGenClientParams = z.input<typeof audioGenClientParamsSchema>;
769
1228
  export type AudioGenStreamRequest = z.infer<typeof audioGenStreamRequestSchema>;
770
1229
  export type AudioGenStats = z.infer<typeof audioGenStatsSchema>;
771
1230
  export type AudioGenStreamResponse = z.infer<typeof audioGenStreamResponseSchema>;
1231
+ export type AudioGenTrack = z.infer<typeof audioGenTrackSchema>;
1232
+ export type AudioGenUnderstandResult = z.infer<typeof audioGenUnderstandResultSchema>;
1233
+ export type AudioUnderstandClientParams = z.input<typeof audioUnderstandClientParamsSchema>;
1234
+ export type AudioUnderstandRequest = z.infer<typeof audioUnderstandRequestSchema>;
1235
+ export type AudioUnderstandResponse = z.infer<typeof audioUnderstandResponseSchema>;
772
1236
  export interface AudioGenAudio {
773
1237
  pcm: Uint8Array;
774
1238
  sampleRate: number;
@@ -782,4 +1246,15 @@ export interface AudioGenResult {
782
1246
  stats: Promise<AudioGenStats | undefined>;
783
1247
  diagnostics: Promise<InferenceBackendDiagnostics | undefined>;
784
1248
  }
1249
+ /**
1250
+ * An `audioUnderstand()` run. Shaped like `AudioGenResult`, except the run
1251
+ * produces a description rather than audio.
1252
+ */
1253
+ export interface AudioUnderstandResult {
1254
+ requestId: string;
1255
+ progressStream: AsyncGenerator<AudioGenProgress>;
1256
+ description: Promise<AudioGenUnderstandResult>;
1257
+ stats: Promise<AudioGenStats | undefined>;
1258
+ diagnostics: Promise<InferenceBackendDiagnostics | undefined>;
1259
+ }
785
1260
  export {};