@buffered-audio/nodes 0.17.0 → 0.18.1
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 +0 -12
- package/dist/cli.js +46 -42
- package/dist/index.d.ts +127 -184
- package/dist/index.js +1824 -1996
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { SourceNode, SourceNodeProperties, BufferedSourceStream, SourceMetadata,
|
|
3
|
-
export { CompositeNode } from '@buffered-audio/core';
|
|
2
|
+
import { SourceNode, SourceNodeProperties, BufferedSourceStream, SourceMetadata, Block, TargetNode, TargetNodeProperties, BufferedTargetStream, StreamContext, TransformNode, TransformNodeProperties, UnbufferedTransformStream, BufferedAudioNode, BufferedTransformStream, BlockBuffer, Composition } from '@buffered-audio/core';
|
|
4
3
|
|
|
5
4
|
declare const ffmpegSchema: z.ZodObject<{
|
|
6
5
|
path: z.ZodDefault<z.ZodString>;
|
|
@@ -20,9 +19,8 @@ declare class ReadFfmpegStream<P extends ReadFfmpegProperties = ReadFfmpegProper
|
|
|
20
19
|
private sourceBitDepth;
|
|
21
20
|
getMetadata(): Promise<SourceMetadata>;
|
|
22
21
|
private ensureInitialized;
|
|
23
|
-
_read(): Promise<
|
|
24
|
-
|
|
25
|
-
_teardown(): void;
|
|
22
|
+
_read(): Promise<Block | undefined>;
|
|
23
|
+
_destroy(): Promise<void>;
|
|
26
24
|
private probe;
|
|
27
25
|
private readBytes;
|
|
28
26
|
}
|
|
@@ -36,8 +34,8 @@ declare class ReadFfmpegNode extends SourceNode<ReadFfmpegProperties> {
|
|
|
36
34
|
ffmpegPath: z.ZodDefault<z.ZodString>;
|
|
37
35
|
ffprobePath: z.ZodDefault<z.ZodString>;
|
|
38
36
|
}, z.core.$strip>;
|
|
37
|
+
static readonly streamClass: typeof ReadFfmpegStream;
|
|
39
38
|
readonly type: readonly ["buffered-audio-node", "source", "read-ffmpeg"];
|
|
40
|
-
protected createStream(): ReadFfmpegStream;
|
|
41
39
|
clone(overrides?: Partial<ReadFfmpegProperties>): ReadFfmpegNode;
|
|
42
40
|
}
|
|
43
41
|
declare function readFfmpeg(path: string, options: {
|
|
@@ -52,7 +50,6 @@ declare const wavSchema: z.ZodObject<{
|
|
|
52
50
|
interface ReadWavProperties extends z.infer<typeof wavSchema>, SourceNodeProperties {
|
|
53
51
|
readonly channels?: ReadonlyArray<number>;
|
|
54
52
|
}
|
|
55
|
-
declare function readSample(data: Buffer, offset: number, bitsPerSample: number, audioFormat: number): number;
|
|
56
53
|
declare class ReadWavStream<P extends ReadWavProperties = ReadWavProperties> extends BufferedSourceStream<P> {
|
|
57
54
|
private fileHandle?;
|
|
58
55
|
private format?;
|
|
@@ -61,9 +58,8 @@ declare class ReadWavStream<P extends ReadWavProperties = ReadWavProperties> ext
|
|
|
61
58
|
private sourceBitDepth;
|
|
62
59
|
getMetadata(): Promise<SourceMetadata>;
|
|
63
60
|
private ensureInitialized;
|
|
64
|
-
_read(): Promise<
|
|
65
|
-
|
|
66
|
-
_teardown(): void;
|
|
61
|
+
_read(): Promise<Block | undefined>;
|
|
62
|
+
_destroy(): Promise<void>;
|
|
67
63
|
}
|
|
68
64
|
declare class ReadWavNode extends SourceNode<ReadWavProperties> {
|
|
69
65
|
static readonly nodeName = "Read WAV";
|
|
@@ -73,41 +69,21 @@ declare class ReadWavNode extends SourceNode<ReadWavProperties> {
|
|
|
73
69
|
static readonly schema: z.ZodObject<{
|
|
74
70
|
path: z.ZodDefault<z.ZodString>;
|
|
75
71
|
}, z.core.$strip>;
|
|
72
|
+
static readonly streamClass: typeof ReadWavStream;
|
|
76
73
|
readonly type: readonly ["buffered-audio-node", "source", "read-wav"];
|
|
77
|
-
protected createStream(): ReadWavStream;
|
|
78
74
|
clone(overrides?: Partial<ReadWavProperties>): ReadWavNode;
|
|
79
75
|
}
|
|
80
76
|
declare function readWav(path: string, options?: {
|
|
81
77
|
channels?: ReadonlyArray<number>;
|
|
82
78
|
}): ReadWavNode;
|
|
83
79
|
|
|
84
|
-
declare const schema$m: z.ZodObject<{
|
|
85
|
-
path: z.ZodDefault<z.ZodString>;
|
|
86
|
-
ffmpegPath: z.ZodDefault<z.ZodString>;
|
|
87
|
-
ffprobePath: z.ZodDefault<z.ZodString>;
|
|
88
|
-
}, z.core.$strip>;
|
|
89
|
-
interface ReadProperties extends z.infer<typeof schema$m>, SourceNodeProperties {
|
|
90
|
-
readonly channels?: ReadonlyArray<number>;
|
|
91
|
-
}
|
|
92
|
-
declare class ReadNode extends SourceNode<ReadProperties> {
|
|
93
|
-
static readonly nodeName = "Read";
|
|
94
|
-
static readonly packageName: string;
|
|
95
|
-
static readonly packageVersion: string;
|
|
96
|
-
static readonly nodeDescription = "Read audio from a file";
|
|
97
|
-
static readonly schema: z.ZodObject<{
|
|
98
|
-
path: z.ZodDefault<z.ZodString>;
|
|
99
|
-
ffmpegPath: z.ZodDefault<z.ZodString>;
|
|
100
|
-
ffprobePath: z.ZodDefault<z.ZodString>;
|
|
101
|
-
}, z.core.$strip>;
|
|
102
|
-
readonly type: readonly ["buffered-audio-node", "source", "read"];
|
|
103
|
-
protected createStream(): ReadWavStream<ReadProperties> | ReadFfmpegStream<ReadProperties>;
|
|
104
|
-
clone(overrides?: Partial<ReadProperties>): ReadNode;
|
|
105
|
-
}
|
|
106
80
|
declare function read(path: string, options?: {
|
|
107
81
|
channels?: ReadonlyArray<number>;
|
|
108
82
|
ffmpegPath?: string;
|
|
109
83
|
ffprobePath?: string;
|
|
110
|
-
}):
|
|
84
|
+
}): ReadWavNode | ReadFfmpegNode;
|
|
85
|
+
|
|
86
|
+
declare function readSample(data: Buffer, offset: number, bitsPerSample: number, audioFormat: number): number;
|
|
111
87
|
|
|
112
88
|
declare const schema$l: z.ZodObject<{
|
|
113
89
|
bucketCount: z.ZodDefault<z.ZodNumber>;
|
|
@@ -138,9 +114,9 @@ declare class LoudnessStatsStream extends BufferedTargetStream<LoudnessStatsProp
|
|
|
138
114
|
private statsInitialized;
|
|
139
115
|
private fileHandle?;
|
|
140
116
|
get stats(): LoudnessStats | undefined;
|
|
141
|
-
_setup(input: ReadableStream<
|
|
117
|
+
_setup(input: ReadableStream<Block>, context: StreamContext): Promise<void>;
|
|
142
118
|
private ensureInit;
|
|
143
|
-
_write(chunk:
|
|
119
|
+
_write(chunk: Block): Promise<void>;
|
|
144
120
|
_close(): Promise<void>;
|
|
145
121
|
}
|
|
146
122
|
declare class LoudnessStatsNode extends TargetNode<LoudnessStatsProperties> {
|
|
@@ -152,13 +128,9 @@ declare class LoudnessStatsNode extends TargetNode<LoudnessStatsProperties> {
|
|
|
152
128
|
bucketCount: z.ZodDefault<z.ZodNumber>;
|
|
153
129
|
outputPath: z.ZodDefault<z.ZodString>;
|
|
154
130
|
}, z.core.$strip>;
|
|
131
|
+
static readonly streamClass: typeof LoudnessStatsStream;
|
|
155
132
|
static is(value: unknown): value is LoudnessStatsNode;
|
|
156
133
|
readonly type: readonly ["buffered-audio-node", "target", "loudness-stats"];
|
|
157
|
-
private cachedStats?;
|
|
158
|
-
constructor(properties: LoudnessStatsProperties);
|
|
159
|
-
get stats(): LoudnessStats | undefined;
|
|
160
|
-
_teardown(): void;
|
|
161
|
-
createStream(): LoudnessStatsStream;
|
|
162
134
|
clone(overrides?: Partial<LoudnessStatsProperties>): LoudnessStatsNode;
|
|
163
135
|
}
|
|
164
136
|
declare function loudnessStats(options?: {
|
|
@@ -200,9 +172,9 @@ declare class SpectrogramStream extends BufferedTargetStream<SpectrogramProperti
|
|
|
200
172
|
private writeBufferFileOffset;
|
|
201
173
|
private readonly WRITE_BATCH_FRAMES;
|
|
202
174
|
private initialized;
|
|
203
|
-
_setup(input: ReadableStream<
|
|
175
|
+
_setup(input: ReadableStream<Block>, context: StreamContext): Promise<void>;
|
|
204
176
|
private initialize;
|
|
205
|
-
_write(chunk:
|
|
177
|
+
_write(chunk: Block): Promise<void>;
|
|
206
178
|
_close(): Promise<void>;
|
|
207
179
|
private processAccumulatedSamples;
|
|
208
180
|
private writeFrame;
|
|
@@ -219,10 +191,9 @@ declare class SpectrogramNode extends TargetNode<SpectrogramProperties> {
|
|
|
219
191
|
hopSize: z.ZodDefault<z.ZodNumber>;
|
|
220
192
|
fftwAddonPath: z.ZodDefault<z.ZodString>;
|
|
221
193
|
}, z.core.$strip>;
|
|
194
|
+
static readonly streamClass: typeof SpectrogramStream;
|
|
222
195
|
static is(value: unknown): value is SpectrogramNode;
|
|
223
196
|
readonly type: readonly ["buffered-audio-node", "target", "spectrogram"];
|
|
224
|
-
constructor(properties: SpectrogramProperties);
|
|
225
|
-
createStream(): SpectrogramStream;
|
|
226
197
|
clone(overrides?: Partial<SpectrogramProperties>): SpectrogramNode;
|
|
227
198
|
}
|
|
228
199
|
declare function spectrogram(outputPath: string, options?: {
|
|
@@ -255,10 +226,10 @@ declare class WaveformStream extends BufferedTargetStream<WaveformProperties> {
|
|
|
255
226
|
private writeBufferFileOffset;
|
|
256
227
|
private readonly WRITE_BATCH_POINTS;
|
|
257
228
|
private initialized;
|
|
258
|
-
_setup(input: ReadableStream<
|
|
229
|
+
_setup(input: ReadableStream<Block>, context: StreamContext): Promise<void>;
|
|
259
230
|
private initialize;
|
|
260
231
|
private writeHeader;
|
|
261
|
-
_write(chunk:
|
|
232
|
+
_write(chunk: Block): Promise<void>;
|
|
262
233
|
_close(): Promise<void>;
|
|
263
234
|
private flushPoint;
|
|
264
235
|
private flushWriteBuffer;
|
|
@@ -272,10 +243,9 @@ declare class WaveformNode extends TargetNode<WaveformProperties> {
|
|
|
272
243
|
outputPath: z.ZodDefault<z.ZodString>;
|
|
273
244
|
resolution: z.ZodDefault<z.ZodNumber>;
|
|
274
245
|
}, z.core.$strip>;
|
|
246
|
+
static readonly streamClass: typeof WaveformStream;
|
|
275
247
|
static is(value: unknown): value is WaveformNode;
|
|
276
248
|
readonly type: readonly ["buffered-audio-node", "target", "waveform"];
|
|
277
|
-
constructor(properties: WaveformProperties);
|
|
278
|
-
createStream(): WaveformStream;
|
|
279
249
|
clone(overrides?: Partial<WaveformProperties>): WaveformNode;
|
|
280
250
|
}
|
|
281
251
|
declare function waveform(outputPath: string, options?: {
|
|
@@ -305,12 +275,12 @@ declare class WriteStream extends BufferedTargetStream<WriteProperties> {
|
|
|
305
275
|
private bytesWritten;
|
|
306
276
|
private useEncoding;
|
|
307
277
|
private initialized;
|
|
308
|
-
_setup(input: ReadableStream<
|
|
278
|
+
_setup(input: ReadableStream<Block>, context: StreamContext): Promise<void>;
|
|
309
279
|
private initialize;
|
|
310
280
|
private spawnFfmpeg;
|
|
311
|
-
_write(chunk:
|
|
281
|
+
_write(chunk: Block): Promise<void>;
|
|
312
282
|
_close(): Promise<void>;
|
|
313
|
-
|
|
283
|
+
_destroy(): Promise<void>;
|
|
314
284
|
private convertChunk;
|
|
315
285
|
private buildFfmpegArgs;
|
|
316
286
|
private writeToStdin;
|
|
@@ -341,8 +311,8 @@ declare class WriteNode extends TargetNode<WriteProperties> {
|
|
|
341
311
|
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
342
312
|
}, z.core.$strip>>;
|
|
343
313
|
}, z.core.$strip>;
|
|
314
|
+
static readonly streamClass: typeof WriteStream;
|
|
344
315
|
readonly type: readonly ["buffered-audio-node", "target", "write"];
|
|
345
|
-
createStream(): WriteStream;
|
|
346
316
|
clone(overrides?: Partial<WriteProperties>): WriteNode;
|
|
347
317
|
}
|
|
348
318
|
declare function write(path: string, options?: {
|
|
@@ -364,11 +334,11 @@ declare const schema$i: z.ZodObject<{
|
|
|
364
334
|
type CutRegion = z.infer<typeof cutRegionSchema>;
|
|
365
335
|
interface CutProperties extends z.infer<typeof schema$i>, TransformNodeProperties {
|
|
366
336
|
}
|
|
367
|
-
declare class CutStream extends
|
|
337
|
+
declare class CutStream extends UnbufferedTransformStream<CutProperties> {
|
|
368
338
|
private sortedRegions;
|
|
369
339
|
private removedFrames;
|
|
370
|
-
constructor(
|
|
371
|
-
|
|
340
|
+
constructor(node: BufferedAudioNode);
|
|
341
|
+
transform(chunk: Block, enqueue: (block: Block) => void): void;
|
|
372
342
|
}
|
|
373
343
|
declare class CutNode extends TransformNode<CutProperties> {
|
|
374
344
|
static readonly nodeName = "Cut";
|
|
@@ -381,9 +351,9 @@ declare class CutNode extends TransformNode<CutProperties> {
|
|
|
381
351
|
end: z.ZodNumber;
|
|
382
352
|
}, z.core.$strip>>>;
|
|
383
353
|
}, z.core.$strip>;
|
|
354
|
+
static readonly streamClass: typeof CutStream;
|
|
384
355
|
static is(value: unknown): value is CutNode;
|
|
385
356
|
readonly type: readonly ["buffered-audio-node", "transform", "cut"];
|
|
386
|
-
createStream(): CutStream;
|
|
387
357
|
clone(overrides?: Partial<CutProperties>): CutNode;
|
|
388
358
|
}
|
|
389
359
|
declare function cut(regions: Array<CutRegion>, options?: {
|
|
@@ -396,10 +366,9 @@ declare const schema$h: z.ZodObject<{
|
|
|
396
366
|
}, z.core.$strip>;
|
|
397
367
|
interface DitherProperties extends z.infer<typeof schema$h>, TransformNodeProperties {
|
|
398
368
|
}
|
|
399
|
-
declare class DitherStream extends
|
|
369
|
+
declare class DitherStream extends UnbufferedTransformStream<DitherProperties> {
|
|
400
370
|
private lastError;
|
|
401
|
-
|
|
402
|
-
_unbuffer(chunk: AudioChunk): AudioChunk;
|
|
371
|
+
transform(chunk: Block, enqueue: (block: Block) => void): void;
|
|
403
372
|
}
|
|
404
373
|
declare class DitherNode extends TransformNode<DitherProperties> {
|
|
405
374
|
static readonly nodeName = "Dither";
|
|
@@ -410,9 +379,9 @@ declare class DitherNode extends TransformNode<DitherProperties> {
|
|
|
410
379
|
bitDepth: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<16>, z.ZodLiteral<24>]>>;
|
|
411
380
|
noiseShaping: z.ZodDefault<z.ZodBoolean>;
|
|
412
381
|
}, z.core.$strip>;
|
|
382
|
+
static readonly streamClass: typeof DitherStream;
|
|
413
383
|
static is(value: unknown): value is DitherNode;
|
|
414
384
|
readonly type: readonly ["buffered-audio-node", "transform", "dither"];
|
|
415
|
-
createStream(): DitherStream;
|
|
416
385
|
clone(overrides?: Partial<DitherProperties>): DitherNode;
|
|
417
386
|
}
|
|
418
387
|
declare function dither(bitDepth: 16 | 24, options?: {
|
|
@@ -426,11 +395,10 @@ declare const schema$g: z.ZodObject<{
|
|
|
426
395
|
interface NormalizeProperties extends z.infer<typeof schema$g>, TransformNodeProperties {
|
|
427
396
|
}
|
|
428
397
|
declare class NormalizeStream extends BufferedTransformStream<NormalizeProperties> {
|
|
398
|
+
blockSize: number;
|
|
429
399
|
private peak;
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
_process(_buffer: ChunkBuffer): void;
|
|
433
|
-
_unbuffer(chunk: AudioChunk): AudioChunk;
|
|
400
|
+
prepare(block: Block): Block;
|
|
401
|
+
transform(buffered: BlockBuffer, enqueue: (block: Block) => void): Promise<void>;
|
|
434
402
|
}
|
|
435
403
|
declare class NormalizeNode extends TransformNode<NormalizeProperties> {
|
|
436
404
|
static readonly nodeName = "Normalize";
|
|
@@ -440,10 +408,9 @@ declare class NormalizeNode extends TransformNode<NormalizeProperties> {
|
|
|
440
408
|
static readonly schema: z.ZodObject<{
|
|
441
409
|
ceiling: z.ZodDefault<z.ZodNumber>;
|
|
442
410
|
}, z.core.$strip>;
|
|
411
|
+
static readonly streamClass: typeof NormalizeStream;
|
|
443
412
|
static is(value: unknown): value is NormalizeNode;
|
|
444
413
|
readonly type: readonly ["buffered-audio-node", "transform", "normalize"];
|
|
445
|
-
constructor(properties: NormalizeProperties);
|
|
446
|
-
createStream(): NormalizeStream;
|
|
447
414
|
clone(overrides?: Partial<NormalizeProperties>): NormalizeNode;
|
|
448
415
|
}
|
|
449
416
|
declare function normalize(options?: {
|
|
@@ -457,14 +424,14 @@ declare const schema$f: z.ZodObject<{
|
|
|
457
424
|
}, z.core.$strip>;
|
|
458
425
|
interface PadProperties extends z.infer<typeof schema$f>, TransformNodeProperties {
|
|
459
426
|
}
|
|
460
|
-
declare class PadStream extends
|
|
427
|
+
declare class PadStream extends UnbufferedTransformStream<PadProperties> {
|
|
461
428
|
private seenChunk;
|
|
462
429
|
private capturedSampleRate;
|
|
463
430
|
private capturedBitDepth;
|
|
464
431
|
private capturedChannels;
|
|
465
432
|
private outputOffset;
|
|
466
|
-
|
|
467
|
-
|
|
433
|
+
transform(chunk: Block, enqueue: (block: Block) => void): void;
|
|
434
|
+
flush(enqueue: (block: Block) => void): void;
|
|
468
435
|
}
|
|
469
436
|
declare class PadNode extends TransformNode<PadProperties> {
|
|
470
437
|
static readonly nodeName = "Pad";
|
|
@@ -475,10 +442,9 @@ declare class PadNode extends TransformNode<PadProperties> {
|
|
|
475
442
|
before: z.ZodDefault<z.ZodNumber>;
|
|
476
443
|
after: z.ZodDefault<z.ZodNumber>;
|
|
477
444
|
}, z.core.$strip>;
|
|
445
|
+
static readonly streamClass: typeof PadStream;
|
|
478
446
|
static is(value: unknown): value is PadNode;
|
|
479
447
|
readonly type: readonly ["buffered-audio-node", "transform", "pad"];
|
|
480
|
-
constructor(properties: PadProperties);
|
|
481
|
-
createStream(): PadStream;
|
|
482
448
|
clone(overrides?: Partial<PadProperties>): PadNode;
|
|
483
449
|
}
|
|
484
450
|
declare function pad(options: {
|
|
@@ -493,9 +459,9 @@ declare const schema$e: z.ZodObject<{
|
|
|
493
459
|
}, z.core.$strip>;
|
|
494
460
|
interface PhaseProperties extends z.infer<typeof schema$e>, TransformNodeProperties {
|
|
495
461
|
}
|
|
496
|
-
declare class PhaseStream extends
|
|
462
|
+
declare class PhaseStream extends UnbufferedTransformStream<PhaseProperties> {
|
|
497
463
|
private allpassState;
|
|
498
|
-
|
|
464
|
+
transform(chunk: Block, enqueue: (block: Block) => void): void;
|
|
499
465
|
private applyInvert;
|
|
500
466
|
private applyPhaseRotation;
|
|
501
467
|
}
|
|
@@ -508,9 +474,9 @@ declare class PhaseNode extends TransformNode<PhaseProperties> {
|
|
|
508
474
|
invert: z.ZodDefault<z.ZodBoolean>;
|
|
509
475
|
angle: z.ZodOptional<z.ZodNumber>;
|
|
510
476
|
}, z.core.$strip>;
|
|
477
|
+
static readonly streamClass: typeof PhaseStream;
|
|
511
478
|
static is(value: unknown): value is PhaseNode;
|
|
512
479
|
readonly type: readonly ["buffered-audio-node", "transform", "phase"];
|
|
513
|
-
createStream(): PhaseStream;
|
|
514
480
|
clone(overrides?: Partial<PhaseProperties>): PhaseNode;
|
|
515
481
|
}
|
|
516
482
|
declare function phase(options?: {
|
|
@@ -523,7 +489,8 @@ declare function invert(options?: {
|
|
|
523
489
|
}): PhaseNode;
|
|
524
490
|
|
|
525
491
|
declare class ReverseStream extends BufferedTransformStream {
|
|
526
|
-
|
|
492
|
+
blockSize: number;
|
|
493
|
+
transform(buffered: BlockBuffer, enqueue: (block: Block) => void): Promise<void>;
|
|
527
494
|
}
|
|
528
495
|
declare class ReverseNode extends TransformNode {
|
|
529
496
|
static readonly nodeName = "Reverse";
|
|
@@ -531,10 +498,9 @@ declare class ReverseNode extends TransformNode {
|
|
|
531
498
|
static readonly packageVersion: string;
|
|
532
499
|
static readonly nodeDescription = "Reverse audio playback direction";
|
|
533
500
|
static readonly schema: z.ZodObject<{}, z.core.$strip>;
|
|
501
|
+
static readonly streamClass: typeof ReverseStream;
|
|
534
502
|
static is(value: unknown): value is ReverseNode;
|
|
535
503
|
readonly type: readonly ["buffered-audio-node", "transform", "reverse"];
|
|
536
|
-
constructor(properties?: TransformNodeProperties);
|
|
537
|
-
createStream(): ReverseStream;
|
|
538
504
|
clone(overrides?: Partial<TransformNodeProperties>): ReverseNode;
|
|
539
505
|
}
|
|
540
506
|
declare function reverse(options?: {
|
|
@@ -548,13 +514,13 @@ declare const schema$d: z.ZodObject<{
|
|
|
548
514
|
interface SpliceProperties extends z.infer<typeof schema$d>, TransformNodeProperties {
|
|
549
515
|
readonly channels?: ReadonlyArray<number>;
|
|
550
516
|
}
|
|
551
|
-
declare class SpliceStream extends
|
|
517
|
+
declare class SpliceStream extends UnbufferedTransformStream<SpliceProperties> {
|
|
552
518
|
private insertSamples;
|
|
553
519
|
private insertSampleRate;
|
|
554
520
|
private insertLength;
|
|
555
521
|
private sampleRateChecked;
|
|
556
|
-
_setup(input: ReadableStream<
|
|
557
|
-
|
|
522
|
+
_setup(input: ReadableStream<Block>, context: StreamContext): Promise<ReadableStream<Block>>;
|
|
523
|
+
transform(chunk: Block, enqueue: (block: Block) => void): void;
|
|
558
524
|
}
|
|
559
525
|
declare class SpliceNode extends TransformNode<SpliceProperties> {
|
|
560
526
|
static readonly nodeName = "Splice";
|
|
@@ -565,9 +531,9 @@ declare class SpliceNode extends TransformNode<SpliceProperties> {
|
|
|
565
531
|
insertPath: z.ZodDefault<z.ZodString>;
|
|
566
532
|
insertAt: z.ZodDefault<z.ZodNumber>;
|
|
567
533
|
}, z.core.$strip>;
|
|
534
|
+
static readonly streamClass: typeof SpliceStream;
|
|
568
535
|
static is(value: unknown): value is SpliceNode;
|
|
569
536
|
readonly type: readonly ["buffered-audio-node", "transform", "splice"];
|
|
570
|
-
createStream(): SpliceStream;
|
|
571
537
|
clone(overrides?: Partial<SpliceProperties>): SpliceNode;
|
|
572
538
|
}
|
|
573
539
|
declare function splice(insertPath: string, insertAt: number, options?: {
|
|
@@ -583,14 +549,12 @@ declare const schema$c: z.ZodObject<{
|
|
|
583
549
|
interface TrimProperties extends z.infer<typeof schema$c>, TransformNodeProperties {
|
|
584
550
|
}
|
|
585
551
|
declare class TrimStream extends BufferedTransformStream<TrimProperties> {
|
|
552
|
+
blockSize: number;
|
|
586
553
|
private firstAbove;
|
|
587
554
|
private lastAbove;
|
|
588
555
|
private scanOffset;
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
_buffer(chunk: AudioChunk, buffer: ChunkBuffer): Promise<void>;
|
|
592
|
-
_process(buffer: ChunkBuffer): Promise<void>;
|
|
593
|
-
_unbuffer(chunk: AudioChunk): AudioChunk | undefined;
|
|
556
|
+
prepare(block: Block): Block;
|
|
557
|
+
transform(buffered: BlockBuffer, enqueue: (block: Block) => void): Promise<void>;
|
|
594
558
|
}
|
|
595
559
|
declare class TrimNode extends TransformNode<TrimProperties> {
|
|
596
560
|
static readonly nodeName = "Trim";
|
|
@@ -603,10 +567,9 @@ declare class TrimNode extends TransformNode<TrimProperties> {
|
|
|
603
567
|
start: z.ZodDefault<z.ZodBoolean>;
|
|
604
568
|
end: z.ZodDefault<z.ZodBoolean>;
|
|
605
569
|
}, z.core.$strip>;
|
|
570
|
+
static readonly streamClass: typeof TrimStream;
|
|
606
571
|
static is(value: unknown): value is TrimNode;
|
|
607
572
|
readonly type: readonly ["buffered-audio-node", "transform", "trim"];
|
|
608
|
-
constructor(properties: TrimProperties);
|
|
609
|
-
createStream(): TrimStream;
|
|
610
573
|
clone(overrides?: Partial<TrimProperties>): TrimNode;
|
|
611
574
|
}
|
|
612
575
|
declare function trim(options?: {
|
|
@@ -617,8 +580,8 @@ declare function trim(options?: {
|
|
|
617
580
|
id?: string;
|
|
618
581
|
}): TrimNode;
|
|
619
582
|
|
|
620
|
-
declare class DownmixMonoStream extends
|
|
621
|
-
|
|
583
|
+
declare class DownmixMonoStream extends UnbufferedTransformStream {
|
|
584
|
+
transform(chunk: Block, enqueue: (block: Block) => void): void;
|
|
622
585
|
}
|
|
623
586
|
declare class DownmixMonoNode extends TransformNode {
|
|
624
587
|
static readonly nodeName = "Downmix Mono";
|
|
@@ -626,9 +589,9 @@ declare class DownmixMonoNode extends TransformNode {
|
|
|
626
589
|
static readonly packageVersion: string;
|
|
627
590
|
static readonly nodeDescription = "Mix all input channels to a single mono channel by averaging";
|
|
628
591
|
static readonly schema: z.ZodObject<{}, z.core.$strip>;
|
|
592
|
+
static readonly streamClass: typeof DownmixMonoStream;
|
|
629
593
|
static is(value: unknown): value is DownmixMonoNode;
|
|
630
594
|
readonly type: readonly ["buffered-audio-node", "transform", "downmix-mono"];
|
|
631
|
-
createStream(): DownmixMonoStream;
|
|
632
595
|
clone(overrides?: Partial<TransformNodeProperties>): DownmixMonoNode;
|
|
633
596
|
}
|
|
634
597
|
declare function downmixMono(options?: {
|
|
@@ -640,8 +603,8 @@ declare const schema$b: z.ZodObject<{
|
|
|
640
603
|
}, z.core.$strip>;
|
|
641
604
|
interface DuplicateChannelsProperties extends z.infer<typeof schema$b>, TransformNodeProperties {
|
|
642
605
|
}
|
|
643
|
-
declare class DuplicateChannelsStream extends
|
|
644
|
-
|
|
606
|
+
declare class DuplicateChannelsStream extends UnbufferedTransformStream<DuplicateChannelsProperties> {
|
|
607
|
+
transform(chunk: Block, enqueue: (block: Block) => void): void;
|
|
645
608
|
}
|
|
646
609
|
declare class DuplicateChannelsNode extends TransformNode<DuplicateChannelsProperties> {
|
|
647
610
|
static readonly nodeName = "Duplicate Channels";
|
|
@@ -651,9 +614,9 @@ declare class DuplicateChannelsNode extends TransformNode<DuplicateChannelsPrope
|
|
|
651
614
|
static readonly schema: z.ZodObject<{
|
|
652
615
|
channels: z.ZodDefault<z.ZodNumber>;
|
|
653
616
|
}, z.core.$strip>;
|
|
617
|
+
static readonly streamClass: typeof DuplicateChannelsStream;
|
|
654
618
|
static is(value: unknown): value is DuplicateChannelsNode;
|
|
655
619
|
readonly type: readonly ["buffered-audio-node", "transform", "duplicate-channels"];
|
|
656
|
-
createStream(): DuplicateChannelsStream;
|
|
657
620
|
clone(overrides?: Partial<DuplicateChannelsProperties>): DuplicateChannelsNode;
|
|
658
621
|
}
|
|
659
622
|
declare function duplicateChannels(options?: {
|
|
@@ -666,8 +629,8 @@ declare const schema$a: z.ZodObject<{
|
|
|
666
629
|
}, z.core.$strip>;
|
|
667
630
|
interface GainProperties extends z.infer<typeof schema$a>, TransformNodeProperties {
|
|
668
631
|
}
|
|
669
|
-
declare class GainStream extends
|
|
670
|
-
|
|
632
|
+
declare class GainStream extends UnbufferedTransformStream<GainProperties> {
|
|
633
|
+
transform(block: Block, enqueue: (block: Block) => void): void;
|
|
671
634
|
}
|
|
672
635
|
declare class GainNode extends TransformNode<GainProperties> {
|
|
673
636
|
static readonly nodeName = "Gain";
|
|
@@ -677,9 +640,9 @@ declare class GainNode extends TransformNode<GainProperties> {
|
|
|
677
640
|
static readonly schema: z.ZodObject<{
|
|
678
641
|
gain: z.ZodDefault<z.ZodNumber>;
|
|
679
642
|
}, z.core.$strip>;
|
|
643
|
+
static readonly streamClass: typeof GainStream;
|
|
680
644
|
static is(value: unknown): value is GainNode;
|
|
681
645
|
readonly type: readonly ["buffered-audio-node", "transform", "gain"];
|
|
682
|
-
createStream(): GainStream;
|
|
683
646
|
clone(overrides?: Partial<GainProperties>): GainNode;
|
|
684
647
|
}
|
|
685
648
|
declare function gain(options?: {
|
|
@@ -692,8 +655,8 @@ declare const schema$9: z.ZodObject<{
|
|
|
692
655
|
}, z.core.$strip>;
|
|
693
656
|
interface PanProperties extends z.infer<typeof schema$9>, TransformNodeProperties {
|
|
694
657
|
}
|
|
695
|
-
declare class PanStream extends
|
|
696
|
-
|
|
658
|
+
declare class PanStream extends UnbufferedTransformStream<PanProperties> {
|
|
659
|
+
transform(chunk: Block, enqueue: (block: Block) => void): void;
|
|
697
660
|
}
|
|
698
661
|
declare class PanNode extends TransformNode<PanProperties> {
|
|
699
662
|
static readonly nodeName = "Pan";
|
|
@@ -703,9 +666,9 @@ declare class PanNode extends TransformNode<PanProperties> {
|
|
|
703
666
|
static readonly schema: z.ZodObject<{
|
|
704
667
|
pan: z.ZodDefault<z.ZodNumber>;
|
|
705
668
|
}, z.core.$strip>;
|
|
669
|
+
static readonly streamClass: typeof PanStream;
|
|
706
670
|
static is(value: unknown): value is PanNode;
|
|
707
671
|
readonly type: readonly ["buffered-audio-node", "transform", "pan"];
|
|
708
|
-
createStream(): PanStream;
|
|
709
672
|
clone(overrides?: Partial<PanProperties>): PanNode;
|
|
710
673
|
}
|
|
711
674
|
declare function pan(options?: {
|
|
@@ -718,28 +681,26 @@ interface FfmpegProperties extends TransformNodeProperties {
|
|
|
718
681
|
readonly args?: Array<string> | ((context: StreamContext) => Array<string>);
|
|
719
682
|
readonly outputSampleRate?: number;
|
|
720
683
|
}
|
|
721
|
-
declare class FfmpegStream<P extends FfmpegProperties = FfmpegProperties> extends
|
|
684
|
+
declare class FfmpegStream<P extends FfmpegProperties = FfmpegProperties> extends UnbufferedTransformStream<P> {
|
|
722
685
|
private streamContext?;
|
|
723
|
-
private _sourceTotalFrames?;
|
|
724
686
|
private child?;
|
|
687
|
+
private enqueueBlock?;
|
|
725
688
|
private stdoutStash;
|
|
726
689
|
private outputOffset;
|
|
727
690
|
private stderr;
|
|
691
|
+
private stdinError?;
|
|
728
692
|
private exitPromise?;
|
|
729
693
|
private stdoutEndPromise?;
|
|
730
694
|
private pendingDrain?;
|
|
731
695
|
private inputSampleRate;
|
|
732
696
|
private inputChannels;
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
protected _buildArgs(_context: StreamContext): Array<string>;
|
|
736
|
-
protected _buildOutputArgs(_context: StreamContext): Array<string>;
|
|
737
|
-
createTransformStream(): TransformStream<AudioChunk, AudioChunk>;
|
|
697
|
+
_setup(input: ReadableStream<Block>, context: StreamContext): Promise<ReadableStream<Block>>;
|
|
698
|
+
protected _buildArgs(context: StreamContext): Array<string>;
|
|
738
699
|
private spawnChild;
|
|
739
700
|
private handleStdoutBytes;
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
701
|
+
transform(block: Block, enqueue: (block: Block) => void): Promise<void>;
|
|
702
|
+
flush(enqueue: (block: Block) => void): Promise<void>;
|
|
703
|
+
_destroy(): Promise<void>;
|
|
743
704
|
}
|
|
744
705
|
declare class FfmpegNode<P extends FfmpegProperties = FfmpegProperties> extends TransformNode<P> {
|
|
745
706
|
static readonly nodeName: string;
|
|
@@ -747,10 +708,9 @@ declare class FfmpegNode<P extends FfmpegProperties = FfmpegProperties> extends
|
|
|
747
708
|
static readonly packageVersion: string;
|
|
748
709
|
static readonly nodeDescription: string;
|
|
749
710
|
static readonly schema: z.ZodType;
|
|
711
|
+
static readonly streamClass: typeof FfmpegStream;
|
|
750
712
|
static is(value: unknown): value is FfmpegNode;
|
|
751
713
|
readonly type: ReadonlyArray<string>;
|
|
752
|
-
constructor(properties: P);
|
|
753
|
-
createStream(): FfmpegStream<P>;
|
|
754
714
|
clone(overrides?: Partial<P>): FfmpegNode<P>;
|
|
755
715
|
}
|
|
756
716
|
declare function ffmpeg(options: {
|
|
@@ -775,11 +735,11 @@ declare const schema$8: z.ZodObject<{
|
|
|
775
735
|
interface LoudnessTargetProperties extends z.infer<typeof schema$8>, TransformNodeProperties {
|
|
776
736
|
}
|
|
777
737
|
declare class LoudnessTargetStream extends BufferedTransformStream<LoudnessTargetProperties> {
|
|
738
|
+
blockSize: number;
|
|
778
739
|
private winningSmoothedEnvelopeBuffer;
|
|
779
740
|
private winningB;
|
|
780
741
|
private winningLimitDb;
|
|
781
742
|
private winningPeakGainDb;
|
|
782
|
-
private unbufferCursorsReady;
|
|
783
743
|
private measurementAccumulator?;
|
|
784
744
|
private capturedDetectionEnvelope;
|
|
785
745
|
unbufferElapsedMs: number;
|
|
@@ -788,10 +748,11 @@ declare class LoudnessTargetStream extends BufferedTransformStream<LoudnessTarge
|
|
|
788
748
|
detection: number;
|
|
789
749
|
iteration: number;
|
|
790
750
|
};
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
751
|
+
prepare(block: Block): Promise<Block>;
|
|
752
|
+
transform(buffered: BlockBuffer, enqueue: (block: Block) => void): Promise<void>;
|
|
753
|
+
private finalize;
|
|
754
|
+
_destroy(): Promise<void>;
|
|
755
|
+
private emitApplied;
|
|
795
756
|
}
|
|
796
757
|
declare class LoudnessTargetNode extends TransformNode<LoudnessTargetProperties> {
|
|
797
758
|
static readonly nodeName = "Loudness Target";
|
|
@@ -810,10 +771,9 @@ declare class LoudnessTargetNode extends TransformNode<LoudnessTargetProperties>
|
|
|
810
771
|
tolerance: z.ZodDefault<z.ZodNumber>;
|
|
811
772
|
peakTolerance: z.ZodDefault<z.ZodNumber>;
|
|
812
773
|
}, z.core.$strip>;
|
|
774
|
+
static readonly streamClass: typeof LoudnessTargetStream;
|
|
813
775
|
static is(value: unknown): value is LoudnessTargetNode;
|
|
814
776
|
readonly type: readonly ["buffered-audio-node", "transform", "loudness-target"];
|
|
815
|
-
constructor(properties: LoudnessTargetProperties);
|
|
816
|
-
createStream(): LoudnessTargetStream;
|
|
817
777
|
clone(overrides?: Partial<LoudnessTargetProperties>): LoudnessTargetNode;
|
|
818
778
|
}
|
|
819
779
|
declare function loudnessTarget(options: {
|
|
@@ -836,11 +796,10 @@ declare const schema$7: z.ZodObject<{
|
|
|
836
796
|
interface LoudnessNormalizeProperties extends z.infer<typeof schema$7>, TransformNodeProperties {
|
|
837
797
|
}
|
|
838
798
|
declare class LoudnessNormalizeStream extends BufferedTransformStream<LoudnessNormalizeProperties> {
|
|
839
|
-
|
|
799
|
+
blockSize: number;
|
|
840
800
|
private accumulator?;
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
_unbuffer(chunk: AudioChunk): AudioChunk;
|
|
801
|
+
prepare(block: Block): Block;
|
|
802
|
+
transform(buffered: BlockBuffer, enqueue: (block: Block) => void): Promise<void>;
|
|
844
803
|
}
|
|
845
804
|
declare class LoudnessNormalizeNode extends TransformNode<LoudnessNormalizeProperties> {
|
|
846
805
|
static readonly nodeName = "Loudness Normalize";
|
|
@@ -850,10 +809,9 @@ declare class LoudnessNormalizeNode extends TransformNode<LoudnessNormalizePrope
|
|
|
850
809
|
static readonly schema: z.ZodObject<{
|
|
851
810
|
target: z.ZodDefault<z.ZodNumber>;
|
|
852
811
|
}, z.core.$strip>;
|
|
812
|
+
static readonly streamClass: typeof LoudnessNormalizeStream;
|
|
853
813
|
static is(value: unknown): value is LoudnessNormalizeNode;
|
|
854
814
|
readonly type: readonly ["buffered-audio-node", "transform", "loudness-normalize"];
|
|
855
|
-
constructor(properties: LoudnessNormalizeProperties);
|
|
856
|
-
createStream(): LoudnessNormalizeStream;
|
|
857
815
|
clone(overrides?: Partial<LoudnessNormalizeProperties>): LoudnessNormalizeNode;
|
|
858
816
|
}
|
|
859
817
|
declare function loudnessNormalize(options?: {
|
|
@@ -867,11 +825,11 @@ declare const schema$6: z.ZodObject<{
|
|
|
867
825
|
interface TruePeakNormalizeProperties extends z.infer<typeof schema$6>, TransformNodeProperties {
|
|
868
826
|
}
|
|
869
827
|
declare class TruePeakNormalizeStream extends BufferedTransformStream<TruePeakNormalizeProperties> {
|
|
870
|
-
|
|
828
|
+
blockSize: number;
|
|
871
829
|
private accumulator?;
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
830
|
+
prepare(block: Block): Block;
|
|
831
|
+
transform(buffered: BlockBuffer, enqueue: (block: Block) => void): Promise<void>;
|
|
832
|
+
private resolveGain;
|
|
875
833
|
}
|
|
876
834
|
declare class TruePeakNormalizeNode extends TransformNode<TruePeakNormalizeProperties> {
|
|
877
835
|
static readonly nodeName = "True Peak Normalize";
|
|
@@ -881,10 +839,9 @@ declare class TruePeakNormalizeNode extends TransformNode<TruePeakNormalizePrope
|
|
|
881
839
|
static readonly schema: z.ZodObject<{
|
|
882
840
|
target: z.ZodDefault<z.ZodNumber>;
|
|
883
841
|
}, z.core.$strip>;
|
|
842
|
+
static readonly streamClass: typeof TruePeakNormalizeStream;
|
|
884
843
|
static is(value: unknown): value is TruePeakNormalizeNode;
|
|
885
844
|
readonly type: readonly ["buffered-audio-node", "transform", "true-peak-normalize"];
|
|
886
|
-
constructor(properties: TruePeakNormalizeProperties);
|
|
887
|
-
createStream(): TruePeakNormalizeStream;
|
|
888
845
|
clone(overrides?: Partial<TruePeakNormalizeProperties>): TruePeakNormalizeNode;
|
|
889
846
|
}
|
|
890
847
|
declare function truePeakNormalize(options?: {
|
|
@@ -901,18 +858,14 @@ declare const schema$5: z.ZodObject<{
|
|
|
901
858
|
interface CrestReduceProperties extends z.infer<typeof schema$5>, TransformNodeProperties {
|
|
902
859
|
}
|
|
903
860
|
declare class CrestReduceStream extends BufferedTransformStream<CrestReduceProperties> {
|
|
861
|
+
blockSize: number;
|
|
904
862
|
private fftBackend?;
|
|
905
863
|
private fftAddonOptions?;
|
|
906
864
|
private truePeakAccumulator?;
|
|
907
|
-
|
|
908
|
-
private applyOrder;
|
|
909
|
-
private applyHopSize;
|
|
910
|
-
private applyState?;
|
|
911
|
-
_setup(input: ReadableStream<AudioChunk>, context: StreamContext): Promise<ReadableStream<AudioChunk>>;
|
|
865
|
+
_setup(input: ReadableStream<Block>, context: StreamContext): Promise<ReadableStream<Block>>;
|
|
912
866
|
private get hopSize();
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
_unbuffer(chunk: AudioChunk): AudioChunk | undefined;
|
|
867
|
+
prepare(block: Block): Block;
|
|
868
|
+
transform(buffered: BlockBuffer, enqueue: (block: Block) => void): Promise<void>;
|
|
916
869
|
}
|
|
917
870
|
declare class CrestReduceNode extends TransformNode<CrestReduceProperties> {
|
|
918
871
|
static readonly nodeName = "Crest Reduce";
|
|
@@ -925,10 +878,9 @@ declare class CrestReduceNode extends TransformNode<CrestReduceProperties> {
|
|
|
925
878
|
vkfftAddonPath: z.ZodDefault<z.ZodString>;
|
|
926
879
|
fftwAddonPath: z.ZodDefault<z.ZodString>;
|
|
927
880
|
}, z.core.$strip>;
|
|
881
|
+
static readonly streamClass: typeof CrestReduceStream;
|
|
928
882
|
static is(value: unknown): value is CrestReduceNode;
|
|
929
883
|
readonly type: readonly ["buffered-audio-node", "transform", "crest-reduce"];
|
|
930
|
-
constructor(properties: CrestReduceProperties);
|
|
931
|
-
createStream(): CrestReduceStream;
|
|
932
884
|
clone(overrides?: Partial<CrestReduceProperties>): CrestReduceNode;
|
|
933
885
|
}
|
|
934
886
|
declare function crestReduce(options?: {
|
|
@@ -958,6 +910,7 @@ declare const schema$4: z.ZodObject<{
|
|
|
958
910
|
interface DeBleedProperties extends z.infer<typeof schema$4>, TransformNodeProperties {
|
|
959
911
|
}
|
|
960
912
|
declare class DeBleedStream extends BufferedTransformStream<DeBleedProperties> {
|
|
913
|
+
blockSize: number;
|
|
961
914
|
private fftBackend?;
|
|
962
915
|
private fftAddonOptions?;
|
|
963
916
|
private dfttFftBackend?;
|
|
@@ -965,10 +918,10 @@ declare class DeBleedStream extends BufferedTransformStream<DeBleedProperties> {
|
|
|
965
918
|
private referenceBuffers;
|
|
966
919
|
private chunkFrames;
|
|
967
920
|
private numBins;
|
|
968
|
-
_setup(input: ReadableStream<
|
|
969
|
-
|
|
921
|
+
_setup(input: ReadableStream<Block>, context: StreamContext): Promise<ReadableStream<Block>>;
|
|
922
|
+
_destroy(): Promise<void>;
|
|
970
923
|
private warmupSeedsAllChannels;
|
|
971
|
-
|
|
924
|
+
transform(buffered: BlockBuffer, enqueue: (block: Block) => void): Promise<void>;
|
|
972
925
|
}
|
|
973
926
|
declare class DeBleedNode extends TransformNode<DeBleedProperties> {
|
|
974
927
|
static readonly nodeName = "De-Bleed Adaptive";
|
|
@@ -991,10 +944,9 @@ declare class DeBleedNode extends TransformNode<DeBleedProperties> {
|
|
|
991
944
|
js: "js";
|
|
992
945
|
}>>;
|
|
993
946
|
}, z.core.$strip>;
|
|
947
|
+
static readonly streamClass: typeof DeBleedStream;
|
|
994
948
|
static is(value: unknown): value is DeBleedNode;
|
|
995
949
|
readonly type: readonly ["buffered-audio-node", "transform", "de-bleed"];
|
|
996
|
-
constructor(properties: DeBleedProperties);
|
|
997
|
-
createStream(): DeBleedStream;
|
|
998
950
|
clone(overrides?: Partial<DeBleedProperties>): DeBleedNode;
|
|
999
951
|
}
|
|
1000
952
|
declare function deBleed(references: string | ReadonlyArray<string>, options?: {
|
|
@@ -1019,11 +971,12 @@ declare const schema$3: z.ZodObject<{
|
|
|
1019
971
|
interface DeepFilterNet3Properties extends z.infer<typeof schema$3>, TransformNodeProperties {
|
|
1020
972
|
}
|
|
1021
973
|
declare class DeepFilterNet3Stream extends BufferedTransformStream<DeepFilterNet3Properties> {
|
|
974
|
+
blockSize: number;
|
|
1022
975
|
private session?;
|
|
1023
976
|
private dfnStates;
|
|
1024
|
-
_setup(input: ReadableStream<
|
|
1025
|
-
|
|
1026
|
-
|
|
977
|
+
_setup(input: ReadableStream<Block>, context: StreamContext): Promise<ReadableStream<Block>>;
|
|
978
|
+
transform(buffered: BlockBuffer, enqueue: (block: Block) => void): Promise<void>;
|
|
979
|
+
_destroy(): void;
|
|
1027
980
|
}
|
|
1028
981
|
declare class DeepFilterNet3Node extends TransformNode<DeepFilterNet3Properties> {
|
|
1029
982
|
static readonly nodeName = "DeepFilterNet3 (Denoiser)";
|
|
@@ -1037,10 +990,9 @@ declare class DeepFilterNet3Node extends TransformNode<DeepFilterNet3Properties>
|
|
|
1037
990
|
sampleRate: z.ZodNumber;
|
|
1038
991
|
attenuation: z.ZodDefault<z.ZodNumber>;
|
|
1039
992
|
}, z.core.$strip>;
|
|
993
|
+
static readonly streamClass: typeof DeepFilterNet3Stream;
|
|
1040
994
|
static is(value: unknown): value is DeepFilterNet3Node;
|
|
1041
995
|
readonly type: readonly ["buffered-audio-node", "transform", "deep-filter-net-3"];
|
|
1042
|
-
constructor(properties: DeepFilterNet3Properties);
|
|
1043
|
-
createStream(): DeepFilterNet3Stream;
|
|
1044
996
|
clone(overrides?: Partial<DeepFilterNet3Properties>): DeepFilterNet3Node;
|
|
1045
997
|
}
|
|
1046
998
|
declare function deepFilterNet3(options: {
|
|
@@ -1063,12 +1015,13 @@ declare const schema$2: z.ZodObject<{
|
|
|
1063
1015
|
interface DtlnProperties extends z.infer<typeof schema$2>, TransformNodeProperties {
|
|
1064
1016
|
}
|
|
1065
1017
|
declare class DtlnStream extends BufferedTransformStream<DtlnProperties> {
|
|
1018
|
+
blockSize: number;
|
|
1066
1019
|
private session1;
|
|
1067
1020
|
private session2;
|
|
1068
1021
|
private fftBackend?;
|
|
1069
1022
|
private fftAddonOptions?;
|
|
1070
|
-
_setup(input: ReadableStream<
|
|
1071
|
-
|
|
1023
|
+
_setup(input: ReadableStream<Block>, context: StreamContext): Promise<ReadableStream<Block>>;
|
|
1024
|
+
transform(buffered: BlockBuffer, enqueue: (block: Block) => void): Promise<void>;
|
|
1072
1025
|
private runMainPass;
|
|
1073
1026
|
}
|
|
1074
1027
|
declare class DtlnNode extends TransformNode<DtlnProperties> {
|
|
@@ -1084,10 +1037,9 @@ declare class DtlnNode extends TransformNode<DtlnProperties> {
|
|
|
1084
1037
|
vkfftAddonPath: z.ZodDefault<z.ZodString>;
|
|
1085
1038
|
fftwAddonPath: z.ZodDefault<z.ZodString>;
|
|
1086
1039
|
}, z.core.$strip>;
|
|
1040
|
+
static readonly streamClass: typeof DtlnStream;
|
|
1087
1041
|
static is(value: unknown): value is DtlnNode;
|
|
1088
1042
|
readonly type: readonly ["buffered-audio-node", "transform", "dtln"];
|
|
1089
|
-
constructor(properties: DtlnProperties);
|
|
1090
|
-
createStream(): DtlnStream;
|
|
1091
1043
|
clone(overrides?: Partial<DtlnProperties>): DtlnNode;
|
|
1092
1044
|
}
|
|
1093
1045
|
declare function dtln(options: {
|
|
@@ -1117,9 +1069,10 @@ interface HtdemucsProperties extends z.infer<typeof schema$1>, TransformNodeProp
|
|
|
1117
1069
|
readonly stems: StemGains;
|
|
1118
1070
|
}
|
|
1119
1071
|
declare class HtdemucsStream extends BufferedTransformStream<HtdemucsProperties> {
|
|
1072
|
+
blockSize: number;
|
|
1120
1073
|
private session;
|
|
1121
|
-
_setup(input: ReadableStream<
|
|
1122
|
-
|
|
1074
|
+
_setup(input: ReadableStream<Block>, context: StreamContext): Promise<ReadableStream<Block>>;
|
|
1075
|
+
transform(buffered: BlockBuffer, enqueue: (block: Block) => void): Promise<void>;
|
|
1123
1076
|
private runMainPass;
|
|
1124
1077
|
private emitStable;
|
|
1125
1078
|
}
|
|
@@ -1135,10 +1088,9 @@ declare class HtdemucsNode extends TransformNode<HtdemucsProperties> {
|
|
|
1135
1088
|
highPass: z.ZodDefault<z.ZodNumber>;
|
|
1136
1089
|
lowPass: z.ZodDefault<z.ZodNumber>;
|
|
1137
1090
|
}, z.core.$strip>;
|
|
1091
|
+
static readonly streamClass: typeof HtdemucsStream;
|
|
1138
1092
|
static is(value: unknown): value is HtdemucsNode;
|
|
1139
1093
|
readonly type: readonly ["buffered-audio-node", "transform", "htdemucs"];
|
|
1140
|
-
constructor(properties: HtdemucsProperties);
|
|
1141
|
-
createStream(): HtdemucsStream;
|
|
1142
1094
|
clone(overrides?: Partial<HtdemucsProperties>): HtdemucsNode;
|
|
1143
1095
|
}
|
|
1144
1096
|
declare function htdemucs(modelPath: string, stems: Partial<StemGains>, options?: {
|
|
@@ -1157,11 +1109,12 @@ declare const schema: z.ZodObject<{
|
|
|
1157
1109
|
interface KimVocal2Properties extends z.infer<typeof schema>, TransformNodeProperties {
|
|
1158
1110
|
}
|
|
1159
1111
|
declare class KimVocal2Stream extends BufferedTransformStream<KimVocal2Properties> {
|
|
1112
|
+
blockSize: number;
|
|
1160
1113
|
private session;
|
|
1161
1114
|
private fftInstance;
|
|
1162
|
-
constructor(
|
|
1163
|
-
_setup(input: ReadableStream<
|
|
1164
|
-
|
|
1115
|
+
constructor(node: BufferedAudioNode);
|
|
1116
|
+
_setup(input: ReadableStream<Block>, context: StreamContext): Promise<ReadableStream<Block>>;
|
|
1117
|
+
transform(buffered: BlockBuffer, enqueue: (block: Block) => void): Promise<void>;
|
|
1165
1118
|
private runMainPass;
|
|
1166
1119
|
private emitStable;
|
|
1167
1120
|
}
|
|
@@ -1177,10 +1130,9 @@ declare class KimVocal2Node extends TransformNode<KimVocal2Properties> {
|
|
|
1177
1130
|
highPass: z.ZodDefault<z.ZodNumber>;
|
|
1178
1131
|
lowPass: z.ZodDefault<z.ZodNumber>;
|
|
1179
1132
|
}, z.core.$strip>;
|
|
1133
|
+
static readonly streamClass: typeof KimVocal2Stream;
|
|
1180
1134
|
static is(value: unknown): value is KimVocal2Node;
|
|
1181
1135
|
readonly type: readonly ["buffered-audio-node", "transform", "kim-vocal-2"];
|
|
1182
|
-
constructor(properties: KimVocal2Properties);
|
|
1183
|
-
createStream(): KimVocal2Stream;
|
|
1184
1136
|
clone(overrides?: Partial<KimVocal2Properties>): KimVocal2Node;
|
|
1185
1137
|
}
|
|
1186
1138
|
declare function kimVocal2(options: {
|
|
@@ -1205,12 +1157,13 @@ interface Vst3Properties extends TransformNodeProperties {
|
|
|
1205
1157
|
readonly extraArgs?: ReadonlyArray<string>;
|
|
1206
1158
|
}
|
|
1207
1159
|
declare class Vst3Stream<P extends Vst3Properties = Vst3Properties> extends BufferedTransformStream<P> {
|
|
1160
|
+
blockSize: number;
|
|
1208
1161
|
private streamContext?;
|
|
1209
1162
|
private stagesJsonPath?;
|
|
1210
1163
|
private stagesJsonCleanup?;
|
|
1211
|
-
_setup(input: ReadableStream<
|
|
1212
|
-
|
|
1213
|
-
|
|
1164
|
+
_setup(input: ReadableStream<Block>, context: StreamContext): Promise<ReadableStream<Block>>;
|
|
1165
|
+
transform(buffered: BlockBuffer, enqueue: (block: Block) => void): Promise<void>;
|
|
1166
|
+
_destroy(): Promise<void>;
|
|
1214
1167
|
}
|
|
1215
1168
|
declare class Vst3Node<P extends Vst3Properties = Vst3Properties> extends TransformNode<P> {
|
|
1216
1169
|
static readonly nodeName: string;
|
|
@@ -1218,10 +1171,9 @@ declare class Vst3Node<P extends Vst3Properties = Vst3Properties> extends Transf
|
|
|
1218
1171
|
static readonly packageVersion: string;
|
|
1219
1172
|
static readonly nodeDescription: string;
|
|
1220
1173
|
static readonly schema: z.ZodType;
|
|
1174
|
+
static readonly streamClass: typeof Vst3Stream;
|
|
1221
1175
|
static is(value: unknown): value is Vst3Node;
|
|
1222
1176
|
readonly type: ReadonlyArray<string>;
|
|
1223
|
-
constructor(properties: P);
|
|
1224
|
-
createStream(): BufferedTransformStream<P>;
|
|
1225
1177
|
clone(overrides?: Partial<P>): Vst3Node<P>;
|
|
1226
1178
|
}
|
|
1227
1179
|
declare function vst3(options: {
|
|
@@ -1232,18 +1184,9 @@ declare function vst3(options: {
|
|
|
1232
1184
|
extraArgs?: ReadonlyArray<string>;
|
|
1233
1185
|
}): Vst3Node;
|
|
1234
1186
|
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
private readonly _head;
|
|
1240
|
-
private readonly _tail;
|
|
1241
|
-
constructor(head: BufferedAudioNode, tail: BufferedAudioNode);
|
|
1242
|
-
get head(): BufferedAudioNode;
|
|
1243
|
-
get tail(): BufferedAudioNode;
|
|
1244
|
-
createStream(): BufferedTransformStream;
|
|
1245
|
-
clone(): ChainNode;
|
|
1246
|
-
}
|
|
1247
|
-
declare function chain(...nodes: Array<BufferedAudioNode | CompositeNode>): ChainNode;
|
|
1187
|
+
interface Chain extends Composition {
|
|
1188
|
+
to(child: BufferedAudioNode | Composition): void;
|
|
1189
|
+
}
|
|
1190
|
+
declare function chain(...items: Array<BufferedAudioNode | Composition>): Chain;
|
|
1248
1191
|
|
|
1249
|
-
export {
|
|
1192
|
+
export { type Chain, CrestReduceNode, type CrestReduceProperties, CrestReduceStream, CutNode, type CutProperties, type CutRegion, CutStream, DeBleedNode, type DeBleedProperties, DeBleedStream, DeepFilterNet3Node, type DeepFilterNet3Properties, DeepFilterNet3Stream, DitherNode, type DitherProperties, DitherStream, DownmixMonoNode, DownmixMonoStream, DtlnNode, type DtlnProperties, DtlnStream, DuplicateChannelsNode, type DuplicateChannelsProperties, DuplicateChannelsStream, type EncodingOptions, FfmpegNode, type FfmpegProperties, FfmpegStream, type FrequencyScale, GainNode, type GainProperties, GainStream, HtdemucsNode, type HtdemucsProperties, HtdemucsStream, KimVocal2Node, type KimVocal2Properties, KimVocal2Stream, LoudnessNormalizeNode, type LoudnessNormalizeProperties, LoudnessNormalizeStream, type LoudnessStats, LoudnessStatsNode, LoudnessStatsStream, LoudnessTargetNode, type LoudnessTargetProperties, LoudnessTargetStream, NormalizeNode, type NormalizeProperties, NormalizeStream, PadNode, type PadProperties, PadStream, PanNode, type PanProperties, PanStream, PhaseNode, type PhaseProperties, PhaseStream, ReadFfmpegNode, type ReadFfmpegProperties, ReadFfmpegStream, ReadWavNode, type ReadWavProperties, ReadWavStream, ReverseNode, ReverseStream, SpectrogramNode, type SpectrogramProperties, SpectrogramStream, SpliceNode, type SpliceProperties, SpliceStream, type StemGains, TrimNode, type TrimProperties, TrimStream, TruePeakNormalizeNode, type TruePeakNormalizeProperties, TruePeakNormalizeStream, Vst3Node, type Vst3Properties, Vst3Stream, type WavBitDepth, WaveformNode, type WaveformProperties, WaveformStream, WriteNode, type WriteProperties, WriteStream, chain, crestReduce, cut, deBleed, deepFilterNet3, dither, downmixMono, dtln, duplicateChannels, ffmpeg, ffmpegSchema, gain, htdemucs, invert, kimVocal2, loudnessNormalize, loudnessStats, loudnessTarget, normalize, pad, pan, phase, read, readFfmpeg, readSample, readWav, reverse, spectrogram, splice, trim, truePeakNormalize, vst3, wavSchema, waveform, write };
|