@buffered-audio/nodes 0.18.1 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +47 -59
- package/dist/chunk-YJWZP2OD.js +2067 -0
- package/dist/cli.js +21 -16
- package/dist/index.d.ts +143 -221
- package/dist/index.js +1098 -3253
- package/dist/nlm-worker.d.ts +2 -0
- package/dist/nlm-worker.js +12 -0
- package/package.json +7 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { SourceNode, SourceNodeProperties, BufferedSourceStream, SourceMetadata, Block, TargetNode, TargetNodeProperties, BufferedTargetStream,
|
|
2
|
+
import { SourceNode, SourceNodeProperties, BufferedSourceStream, SourceMetadata, Block, TargetNode, TargetNodeProperties, BufferedTargetStream, StreamSetupContext, TransformNode, TransformNodeProperties, UnbufferedTransformStream, StreamContext, BufferedTransformStream, BlockBuffer, Composition, BufferedAudioNode } from '@buffered-audio/core';
|
|
3
3
|
|
|
4
4
|
declare const ffmpegSchema: z.ZodObject<{
|
|
5
5
|
path: z.ZodDefault<z.ZodString>;
|
|
@@ -9,7 +9,7 @@ declare const ffmpegSchema: z.ZodObject<{
|
|
|
9
9
|
interface ReadFfmpegProperties extends z.infer<typeof ffmpegSchema>, SourceNodeProperties {
|
|
10
10
|
readonly channels?: ReadonlyArray<number>;
|
|
11
11
|
}
|
|
12
|
-
declare class ReadFfmpegStream
|
|
12
|
+
declare class ReadFfmpegStream extends BufferedSourceStream<ReadFfmpegNode> {
|
|
13
13
|
private ffmpegProcess?;
|
|
14
14
|
private stdout?;
|
|
15
15
|
private frameOffset;
|
|
@@ -28,15 +28,13 @@ declare class ReadFfmpegNode extends SourceNode<ReadFfmpegProperties> {
|
|
|
28
28
|
static readonly nodeName = "Read FFmpeg";
|
|
29
29
|
static readonly packageName: string;
|
|
30
30
|
static readonly packageVersion: string;
|
|
31
|
-
static readonly
|
|
31
|
+
static readonly description = "Read audio from a file using FFmpeg";
|
|
32
32
|
static readonly schema: z.ZodObject<{
|
|
33
33
|
path: z.ZodDefault<z.ZodString>;
|
|
34
34
|
ffmpegPath: z.ZodDefault<z.ZodString>;
|
|
35
35
|
ffprobePath: z.ZodDefault<z.ZodString>;
|
|
36
36
|
}, z.core.$strip>;
|
|
37
|
-
static readonly
|
|
38
|
-
readonly type: readonly ["buffered-audio-node", "source", "read-ffmpeg"];
|
|
39
|
-
clone(overrides?: Partial<ReadFfmpegProperties>): ReadFfmpegNode;
|
|
37
|
+
static readonly Stream: typeof ReadFfmpegStream;
|
|
40
38
|
}
|
|
41
39
|
declare function readFfmpeg(path: string, options: {
|
|
42
40
|
channels?: ReadonlyArray<number>;
|
|
@@ -50,7 +48,7 @@ declare const wavSchema: z.ZodObject<{
|
|
|
50
48
|
interface ReadWavProperties extends z.infer<typeof wavSchema>, SourceNodeProperties {
|
|
51
49
|
readonly channels?: ReadonlyArray<number>;
|
|
52
50
|
}
|
|
53
|
-
declare class ReadWavStream
|
|
51
|
+
declare class ReadWavStream extends BufferedSourceStream<ReadWavNode> {
|
|
54
52
|
private fileHandle?;
|
|
55
53
|
private format?;
|
|
56
54
|
private bytesRead;
|
|
@@ -65,13 +63,11 @@ declare class ReadWavNode extends SourceNode<ReadWavProperties> {
|
|
|
65
63
|
static readonly nodeName = "Read WAV";
|
|
66
64
|
static readonly packageName: string;
|
|
67
65
|
static readonly packageVersion: string;
|
|
68
|
-
static readonly
|
|
66
|
+
static readonly description = "Read audio from a WAV file";
|
|
69
67
|
static readonly schema: z.ZodObject<{
|
|
70
68
|
path: z.ZodDefault<z.ZodString>;
|
|
71
69
|
}, z.core.$strip>;
|
|
72
|
-
static readonly
|
|
73
|
-
readonly type: readonly ["buffered-audio-node", "source", "read-wav"];
|
|
74
|
-
clone(overrides?: Partial<ReadWavProperties>): ReadWavNode;
|
|
70
|
+
static readonly Stream: typeof ReadWavStream;
|
|
75
71
|
}
|
|
76
72
|
declare function readWav(path: string, options?: {
|
|
77
73
|
channels?: ReadonlyArray<number>;
|
|
@@ -104,7 +100,7 @@ interface LoudnessStats {
|
|
|
104
100
|
readonly range: number;
|
|
105
101
|
readonly amplitude: AmplitudeDistribution;
|
|
106
102
|
}
|
|
107
|
-
declare class LoudnessStatsStream extends BufferedTargetStream<
|
|
103
|
+
declare class LoudnessStatsStream extends BufferedTargetStream<LoudnessStatsNode> {
|
|
108
104
|
private channels;
|
|
109
105
|
private sampleRate;
|
|
110
106
|
private truePeakAccumulator;
|
|
@@ -114,24 +110,21 @@ declare class LoudnessStatsStream extends BufferedTargetStream<LoudnessStatsProp
|
|
|
114
110
|
private statsInitialized;
|
|
115
111
|
private fileHandle?;
|
|
116
112
|
get stats(): LoudnessStats | undefined;
|
|
117
|
-
_setup(input: ReadableStream<Block>, context:
|
|
113
|
+
_setup(input: ReadableStream<Block>, context: StreamSetupContext): Promise<void>;
|
|
118
114
|
private ensureInit;
|
|
119
|
-
_write(chunk: Block):
|
|
115
|
+
_write(chunk: Block): void;
|
|
120
116
|
_close(): Promise<void>;
|
|
121
117
|
}
|
|
122
118
|
declare class LoudnessStatsNode extends TargetNode<LoudnessStatsProperties> {
|
|
123
119
|
static readonly nodeName = "Loudness Stats";
|
|
124
120
|
static readonly packageName: string;
|
|
125
121
|
static readonly packageVersion: string;
|
|
126
|
-
static readonly
|
|
122
|
+
static readonly description = "Measure integrated loudness, true peak, and loudness range per EBU R128, plus an amplitude-distribution histogram";
|
|
127
123
|
static readonly schema: z.ZodObject<{
|
|
128
124
|
bucketCount: z.ZodDefault<z.ZodNumber>;
|
|
129
125
|
outputPath: z.ZodDefault<z.ZodString>;
|
|
130
126
|
}, z.core.$strip>;
|
|
131
|
-
static readonly
|
|
132
|
-
static is(value: unknown): value is LoudnessStatsNode;
|
|
133
|
-
readonly type: readonly ["buffered-audio-node", "target", "loudness-stats"];
|
|
134
|
-
clone(overrides?: Partial<LoudnessStatsProperties>): LoudnessStatsNode;
|
|
127
|
+
static readonly Stream: typeof LoudnessStatsStream;
|
|
135
128
|
}
|
|
136
129
|
declare function loudnessStats(options?: {
|
|
137
130
|
id?: string;
|
|
@@ -152,7 +145,7 @@ interface SpectrogramProperties extends z.infer<typeof schema$k>, TargetNodeProp
|
|
|
152
145
|
readonly minFrequency?: number;
|
|
153
146
|
readonly maxFrequency?: number;
|
|
154
147
|
}
|
|
155
|
-
declare class SpectrogramStream extends BufferedTargetStream<
|
|
148
|
+
declare class SpectrogramStream extends BufferedTargetStream<SpectrogramNode> {
|
|
156
149
|
private fileHandle?;
|
|
157
150
|
private channels;
|
|
158
151
|
private linearBins;
|
|
@@ -172,7 +165,7 @@ declare class SpectrogramStream extends BufferedTargetStream<SpectrogramProperti
|
|
|
172
165
|
private writeBufferFileOffset;
|
|
173
166
|
private readonly WRITE_BATCH_FRAMES;
|
|
174
167
|
private initialized;
|
|
175
|
-
_setup(input: ReadableStream<Block>, context:
|
|
168
|
+
_setup(input: ReadableStream<Block>, context: StreamSetupContext): Promise<void>;
|
|
176
169
|
private initialize;
|
|
177
170
|
_write(chunk: Block): Promise<void>;
|
|
178
171
|
_close(): Promise<void>;
|
|
@@ -184,17 +177,14 @@ declare class SpectrogramNode extends TargetNode<SpectrogramProperties> {
|
|
|
184
177
|
static readonly nodeName = "Spectrogram";
|
|
185
178
|
static readonly packageName: string;
|
|
186
179
|
static readonly packageVersion: string;
|
|
187
|
-
static readonly
|
|
180
|
+
static readonly description = "Generate spectrogram visualization data";
|
|
188
181
|
static readonly schema: z.ZodObject<{
|
|
189
182
|
outputPath: z.ZodDefault<z.ZodString>;
|
|
190
183
|
fftSize: z.ZodDefault<z.ZodNumber>;
|
|
191
184
|
hopSize: z.ZodDefault<z.ZodNumber>;
|
|
192
185
|
fftwAddonPath: z.ZodDefault<z.ZodString>;
|
|
193
186
|
}, z.core.$strip>;
|
|
194
|
-
static readonly
|
|
195
|
-
static is(value: unknown): value is SpectrogramNode;
|
|
196
|
-
readonly type: readonly ["buffered-audio-node", "target", "spectrogram"];
|
|
197
|
-
clone(overrides?: Partial<SpectrogramProperties>): SpectrogramNode;
|
|
187
|
+
static readonly Stream: typeof SpectrogramStream;
|
|
198
188
|
}
|
|
199
189
|
declare function spectrogram(outputPath: string, options?: {
|
|
200
190
|
fftSize?: number;
|
|
@@ -212,7 +202,7 @@ declare const schema$j: z.ZodObject<{
|
|
|
212
202
|
}, z.core.$strip>;
|
|
213
203
|
interface WaveformProperties extends z.infer<typeof schema$j>, TargetNodeProperties {
|
|
214
204
|
}
|
|
215
|
-
declare class WaveformStream extends BufferedTargetStream<
|
|
205
|
+
declare class WaveformStream extends BufferedTargetStream<WaveformNode> {
|
|
216
206
|
private fileHandle?;
|
|
217
207
|
private channels;
|
|
218
208
|
private samplesPerPoint;
|
|
@@ -226,7 +216,7 @@ declare class WaveformStream extends BufferedTargetStream<WaveformProperties> {
|
|
|
226
216
|
private writeBufferFileOffset;
|
|
227
217
|
private readonly WRITE_BATCH_POINTS;
|
|
228
218
|
private initialized;
|
|
229
|
-
_setup(input: ReadableStream<Block>, context:
|
|
219
|
+
_setup(input: ReadableStream<Block>, context: StreamSetupContext): Promise<void>;
|
|
230
220
|
private initialize;
|
|
231
221
|
private writeHeader;
|
|
232
222
|
_write(chunk: Block): Promise<void>;
|
|
@@ -238,15 +228,12 @@ declare class WaveformNode extends TargetNode<WaveformProperties> {
|
|
|
238
228
|
static readonly nodeName = "Waveform";
|
|
239
229
|
static readonly packageName: string;
|
|
240
230
|
static readonly packageVersion: string;
|
|
241
|
-
static readonly
|
|
231
|
+
static readonly description = "Generate waveform visualization data";
|
|
242
232
|
static readonly schema: z.ZodObject<{
|
|
243
233
|
outputPath: z.ZodDefault<z.ZodString>;
|
|
244
234
|
resolution: z.ZodDefault<z.ZodNumber>;
|
|
245
235
|
}, z.core.$strip>;
|
|
246
|
-
static readonly
|
|
247
|
-
static is(value: unknown): value is WaveformNode;
|
|
248
|
-
readonly type: readonly ["buffered-audio-node", "target", "waveform"];
|
|
249
|
-
clone(overrides?: Partial<WaveformProperties>): WaveformNode;
|
|
236
|
+
static readonly Stream: typeof WaveformStream;
|
|
250
237
|
}
|
|
251
238
|
declare function waveform(outputPath: string, options?: {
|
|
252
239
|
resolution?: number;
|
|
@@ -265,7 +252,7 @@ interface WriteProperties extends TargetNodeProperties {
|
|
|
265
252
|
readonly bitDepth: WavBitDepth;
|
|
266
253
|
readonly encoding?: EncodingOptions;
|
|
267
254
|
}
|
|
268
|
-
declare class WriteStream extends BufferedTargetStream<
|
|
255
|
+
declare class WriteStream extends BufferedTargetStream<WriteNode> {
|
|
269
256
|
private fileHandle?;
|
|
270
257
|
private ffmpegProcess?;
|
|
271
258
|
private ffmpegStdin?;
|
|
@@ -275,7 +262,7 @@ declare class WriteStream extends BufferedTargetStream<WriteProperties> {
|
|
|
275
262
|
private bytesWritten;
|
|
276
263
|
private useEncoding;
|
|
277
264
|
private initialized;
|
|
278
|
-
_setup(input: ReadableStream<Block>, context:
|
|
265
|
+
_setup(input: ReadableStream<Block>, context: StreamSetupContext): Promise<void>;
|
|
279
266
|
private initialize;
|
|
280
267
|
private spawnFfmpeg;
|
|
281
268
|
_write(chunk: Block): Promise<void>;
|
|
@@ -289,7 +276,7 @@ declare class WriteNode extends TargetNode<WriteProperties> {
|
|
|
289
276
|
static readonly nodeName = "Write";
|
|
290
277
|
static readonly packageName: string;
|
|
291
278
|
static readonly packageVersion: string;
|
|
292
|
-
static readonly
|
|
279
|
+
static readonly description = "Write audio to a file";
|
|
293
280
|
static readonly schema: z.ZodObject<{
|
|
294
281
|
path: z.ZodDefault<z.ZodString>;
|
|
295
282
|
ffmpegPath: z.ZodDefault<z.ZodString>;
|
|
@@ -311,9 +298,7 @@ declare class WriteNode extends TargetNode<WriteProperties> {
|
|
|
311
298
|
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
312
299
|
}, z.core.$strip>>;
|
|
313
300
|
}, z.core.$strip>;
|
|
314
|
-
static readonly
|
|
315
|
-
readonly type: readonly ["buffered-audio-node", "target", "write"];
|
|
316
|
-
clone(overrides?: Partial<WriteProperties>): WriteNode;
|
|
301
|
+
static readonly Stream: typeof WriteStream;
|
|
317
302
|
}
|
|
318
303
|
declare function write(path: string, options?: {
|
|
319
304
|
bitDepth?: WavBitDepth;
|
|
@@ -334,27 +319,24 @@ declare const schema$i: z.ZodObject<{
|
|
|
334
319
|
type CutRegion = z.infer<typeof cutRegionSchema>;
|
|
335
320
|
interface CutProperties extends z.infer<typeof schema$i>, TransformNodeProperties {
|
|
336
321
|
}
|
|
337
|
-
declare class CutStream extends UnbufferedTransformStream<
|
|
322
|
+
declare class CutStream extends UnbufferedTransformStream<CutNode> {
|
|
338
323
|
private sortedRegions;
|
|
339
324
|
private removedFrames;
|
|
340
|
-
constructor(node:
|
|
341
|
-
|
|
325
|
+
constructor(node: CutNode, context: StreamContext);
|
|
326
|
+
_transform(chunk: Block): Generator<Block>;
|
|
342
327
|
}
|
|
343
328
|
declare class CutNode extends TransformNode<CutProperties> {
|
|
344
329
|
static readonly nodeName = "Cut";
|
|
345
330
|
static readonly packageName: string;
|
|
346
331
|
static readonly packageVersion: string;
|
|
347
|
-
static readonly
|
|
332
|
+
static readonly description = "Remove a region of audio";
|
|
348
333
|
static readonly schema: z.ZodObject<{
|
|
349
334
|
regions: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
350
335
|
start: z.ZodNumber;
|
|
351
336
|
end: z.ZodNumber;
|
|
352
337
|
}, z.core.$strip>>>;
|
|
353
338
|
}, z.core.$strip>;
|
|
354
|
-
static readonly
|
|
355
|
-
static is(value: unknown): value is CutNode;
|
|
356
|
-
readonly type: readonly ["buffered-audio-node", "transform", "cut"];
|
|
357
|
-
clone(overrides?: Partial<CutProperties>): CutNode;
|
|
339
|
+
static readonly Stream: typeof CutStream;
|
|
358
340
|
}
|
|
359
341
|
declare function cut(regions: Array<CutRegion>, options?: {
|
|
360
342
|
id?: string;
|
|
@@ -366,23 +348,20 @@ declare const schema$h: z.ZodObject<{
|
|
|
366
348
|
}, z.core.$strip>;
|
|
367
349
|
interface DitherProperties extends z.infer<typeof schema$h>, TransformNodeProperties {
|
|
368
350
|
}
|
|
369
|
-
declare class DitherStream extends UnbufferedTransformStream<
|
|
351
|
+
declare class DitherStream extends UnbufferedTransformStream<DitherNode> {
|
|
370
352
|
private lastError;
|
|
371
|
-
|
|
353
|
+
_transform(chunk: Block): Generator<Block>;
|
|
372
354
|
}
|
|
373
355
|
declare class DitherNode extends TransformNode<DitherProperties> {
|
|
374
356
|
static readonly nodeName = "Dither";
|
|
375
357
|
static readonly packageName: string;
|
|
376
358
|
static readonly packageVersion: string;
|
|
377
|
-
static readonly
|
|
359
|
+
static readonly description = "Add shaped noise to reduce quantization distortion";
|
|
378
360
|
static readonly schema: z.ZodObject<{
|
|
379
361
|
bitDepth: z.ZodDefault<z.ZodUnion<readonly [z.ZodLiteral<16>, z.ZodLiteral<24>]>>;
|
|
380
362
|
noiseShaping: z.ZodDefault<z.ZodBoolean>;
|
|
381
363
|
}, z.core.$strip>;
|
|
382
|
-
static readonly
|
|
383
|
-
static is(value: unknown): value is DitherNode;
|
|
384
|
-
readonly type: readonly ["buffered-audio-node", "transform", "dither"];
|
|
385
|
-
clone(overrides?: Partial<DitherProperties>): DitherNode;
|
|
364
|
+
static readonly Stream: typeof DitherStream;
|
|
386
365
|
}
|
|
387
366
|
declare function dither(bitDepth: 16 | 24, options?: {
|
|
388
367
|
noiseShaping?: boolean;
|
|
@@ -394,24 +373,21 @@ declare const schema$g: z.ZodObject<{
|
|
|
394
373
|
}, z.core.$strip>;
|
|
395
374
|
interface NormalizeProperties extends z.infer<typeof schema$g>, TransformNodeProperties {
|
|
396
375
|
}
|
|
397
|
-
declare class NormalizeStream extends BufferedTransformStream<
|
|
376
|
+
declare class NormalizeStream extends BufferedTransformStream<NormalizeNode> {
|
|
398
377
|
blockSize: number;
|
|
399
378
|
private peak;
|
|
400
|
-
|
|
401
|
-
|
|
379
|
+
_prepare(block: Block): Block;
|
|
380
|
+
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
402
381
|
}
|
|
403
382
|
declare class NormalizeNode extends TransformNode<NormalizeProperties> {
|
|
404
383
|
static readonly nodeName = "Normalize";
|
|
405
384
|
static readonly packageName: string;
|
|
406
385
|
static readonly packageVersion: string;
|
|
407
|
-
static readonly
|
|
386
|
+
static readonly description = "Adjust peak or loudness level to a target ceiling";
|
|
408
387
|
static readonly schema: z.ZodObject<{
|
|
409
388
|
ceiling: z.ZodDefault<z.ZodNumber>;
|
|
410
389
|
}, z.core.$strip>;
|
|
411
|
-
static readonly
|
|
412
|
-
static is(value: unknown): value is NormalizeNode;
|
|
413
|
-
readonly type: readonly ["buffered-audio-node", "transform", "normalize"];
|
|
414
|
-
clone(overrides?: Partial<NormalizeProperties>): NormalizeNode;
|
|
390
|
+
static readonly Stream: typeof NormalizeStream;
|
|
415
391
|
}
|
|
416
392
|
declare function normalize(options?: {
|
|
417
393
|
ceiling?: number;
|
|
@@ -424,28 +400,25 @@ declare const schema$f: z.ZodObject<{
|
|
|
424
400
|
}, z.core.$strip>;
|
|
425
401
|
interface PadProperties extends z.infer<typeof schema$f>, TransformNodeProperties {
|
|
426
402
|
}
|
|
427
|
-
declare class PadStream extends UnbufferedTransformStream<
|
|
403
|
+
declare class PadStream extends UnbufferedTransformStream<PadNode> {
|
|
428
404
|
private seenChunk;
|
|
429
405
|
private capturedSampleRate;
|
|
430
406
|
private capturedBitDepth;
|
|
431
407
|
private capturedChannels;
|
|
432
408
|
private outputOffset;
|
|
433
|
-
|
|
434
|
-
|
|
409
|
+
_transform(chunk: Block): Generator<Block>;
|
|
410
|
+
_flush(): Generator<Block>;
|
|
435
411
|
}
|
|
436
412
|
declare class PadNode extends TransformNode<PadProperties> {
|
|
437
413
|
static readonly nodeName = "Pad";
|
|
438
414
|
static readonly packageName: string;
|
|
439
415
|
static readonly packageVersion: string;
|
|
440
|
-
static readonly
|
|
416
|
+
static readonly description = "Add silence to start or end of audio";
|
|
441
417
|
static readonly schema: z.ZodObject<{
|
|
442
418
|
before: z.ZodDefault<z.ZodNumber>;
|
|
443
419
|
after: z.ZodDefault<z.ZodNumber>;
|
|
444
420
|
}, z.core.$strip>;
|
|
445
|
-
static readonly
|
|
446
|
-
static is(value: unknown): value is PadNode;
|
|
447
|
-
readonly type: readonly ["buffered-audio-node", "transform", "pad"];
|
|
448
|
-
clone(overrides?: Partial<PadProperties>): PadNode;
|
|
421
|
+
static readonly Stream: typeof PadStream;
|
|
449
422
|
}
|
|
450
423
|
declare function pad(options: {
|
|
451
424
|
before?: number;
|
|
@@ -459,9 +432,9 @@ declare const schema$e: z.ZodObject<{
|
|
|
459
432
|
}, z.core.$strip>;
|
|
460
433
|
interface PhaseProperties extends z.infer<typeof schema$e>, TransformNodeProperties {
|
|
461
434
|
}
|
|
462
|
-
declare class PhaseStream extends UnbufferedTransformStream<
|
|
435
|
+
declare class PhaseStream extends UnbufferedTransformStream<PhaseNode> {
|
|
463
436
|
private allpassState;
|
|
464
|
-
|
|
437
|
+
_transform(chunk: Block): Generator<Block>;
|
|
465
438
|
private applyInvert;
|
|
466
439
|
private applyPhaseRotation;
|
|
467
440
|
}
|
|
@@ -469,15 +442,12 @@ declare class PhaseNode extends TransformNode<PhaseProperties> {
|
|
|
469
442
|
static readonly nodeName = "Phase";
|
|
470
443
|
static readonly packageName: string;
|
|
471
444
|
static readonly packageVersion: string;
|
|
472
|
-
static readonly
|
|
445
|
+
static readonly description = "Invert or rotate signal phase";
|
|
473
446
|
static readonly schema: z.ZodObject<{
|
|
474
447
|
invert: z.ZodDefault<z.ZodBoolean>;
|
|
475
448
|
angle: z.ZodOptional<z.ZodNumber>;
|
|
476
449
|
}, z.core.$strip>;
|
|
477
|
-
static readonly
|
|
478
|
-
static is(value: unknown): value is PhaseNode;
|
|
479
|
-
readonly type: readonly ["buffered-audio-node", "transform", "phase"];
|
|
480
|
-
clone(overrides?: Partial<PhaseProperties>): PhaseNode;
|
|
450
|
+
static readonly Stream: typeof PhaseStream;
|
|
481
451
|
}
|
|
482
452
|
declare function phase(options?: {
|
|
483
453
|
invert?: boolean;
|
|
@@ -490,18 +460,15 @@ declare function invert(options?: {
|
|
|
490
460
|
|
|
491
461
|
declare class ReverseStream extends BufferedTransformStream {
|
|
492
462
|
blockSize: number;
|
|
493
|
-
|
|
463
|
+
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
494
464
|
}
|
|
495
465
|
declare class ReverseNode extends TransformNode {
|
|
496
466
|
static readonly nodeName = "Reverse";
|
|
497
467
|
static readonly packageName: string;
|
|
498
468
|
static readonly packageVersion: string;
|
|
499
|
-
static readonly
|
|
469
|
+
static readonly description = "Reverse audio playback direction";
|
|
500
470
|
static readonly schema: z.ZodObject<{}, z.core.$strip>;
|
|
501
|
-
static readonly
|
|
502
|
-
static is(value: unknown): value is ReverseNode;
|
|
503
|
-
readonly type: readonly ["buffered-audio-node", "transform", "reverse"];
|
|
504
|
-
clone(overrides?: Partial<TransformNodeProperties>): ReverseNode;
|
|
471
|
+
static readonly Stream: typeof ReverseStream;
|
|
505
472
|
}
|
|
506
473
|
declare function reverse(options?: {
|
|
507
474
|
id?: string;
|
|
@@ -514,27 +481,24 @@ declare const schema$d: z.ZodObject<{
|
|
|
514
481
|
interface SpliceProperties extends z.infer<typeof schema$d>, TransformNodeProperties {
|
|
515
482
|
readonly channels?: ReadonlyArray<number>;
|
|
516
483
|
}
|
|
517
|
-
declare class SpliceStream extends UnbufferedTransformStream<
|
|
484
|
+
declare class SpliceStream extends UnbufferedTransformStream<SpliceNode> {
|
|
518
485
|
private insertSamples;
|
|
519
486
|
private insertSampleRate;
|
|
520
487
|
private insertLength;
|
|
521
488
|
private sampleRateChecked;
|
|
522
|
-
_setup(
|
|
523
|
-
|
|
489
|
+
_setup(_context: StreamSetupContext): Promise<void>;
|
|
490
|
+
_transform(chunk: Block): Generator<Block>;
|
|
524
491
|
}
|
|
525
492
|
declare class SpliceNode extends TransformNode<SpliceProperties> {
|
|
526
493
|
static readonly nodeName = "Splice";
|
|
527
494
|
static readonly packageName: string;
|
|
528
495
|
static readonly packageVersion: string;
|
|
529
|
-
static readonly
|
|
496
|
+
static readonly description = "Replace a region of audio with processed content";
|
|
530
497
|
static readonly schema: z.ZodObject<{
|
|
531
498
|
insertPath: z.ZodDefault<z.ZodString>;
|
|
532
499
|
insertAt: z.ZodDefault<z.ZodNumber>;
|
|
533
500
|
}, z.core.$strip>;
|
|
534
|
-
static readonly
|
|
535
|
-
static is(value: unknown): value is SpliceNode;
|
|
536
|
-
readonly type: readonly ["buffered-audio-node", "transform", "splice"];
|
|
537
|
-
clone(overrides?: Partial<SpliceProperties>): SpliceNode;
|
|
501
|
+
static readonly Stream: typeof SpliceStream;
|
|
538
502
|
}
|
|
539
503
|
declare function splice(insertPath: string, insertAt: number, options?: {
|
|
540
504
|
channels?: ReadonlyArray<number>;
|
|
@@ -548,29 +512,26 @@ declare const schema$c: z.ZodObject<{
|
|
|
548
512
|
}, z.core.$strip>;
|
|
549
513
|
interface TrimProperties extends z.infer<typeof schema$c>, TransformNodeProperties {
|
|
550
514
|
}
|
|
551
|
-
declare class TrimStream extends BufferedTransformStream<
|
|
515
|
+
declare class TrimStream extends BufferedTransformStream<TrimNode> {
|
|
552
516
|
blockSize: number;
|
|
553
517
|
private firstAbove;
|
|
554
518
|
private lastAbove;
|
|
555
519
|
private scanOffset;
|
|
556
|
-
|
|
557
|
-
|
|
520
|
+
_prepare(block: Block): Block;
|
|
521
|
+
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
558
522
|
}
|
|
559
523
|
declare class TrimNode extends TransformNode<TrimProperties> {
|
|
560
524
|
static readonly nodeName = "Trim";
|
|
561
525
|
static readonly packageName: string;
|
|
562
526
|
static readonly packageVersion: string;
|
|
563
|
-
static readonly
|
|
527
|
+
static readonly description = "Remove silence from start and end";
|
|
564
528
|
static readonly schema: z.ZodObject<{
|
|
565
529
|
threshold: z.ZodDefault<z.ZodNumber>;
|
|
566
530
|
margin: z.ZodDefault<z.ZodNumber>;
|
|
567
531
|
start: z.ZodDefault<z.ZodBoolean>;
|
|
568
532
|
end: z.ZodDefault<z.ZodBoolean>;
|
|
569
533
|
}, z.core.$strip>;
|
|
570
|
-
static readonly
|
|
571
|
-
static is(value: unknown): value is TrimNode;
|
|
572
|
-
readonly type: readonly ["buffered-audio-node", "transform", "trim"];
|
|
573
|
-
clone(overrides?: Partial<TrimProperties>): TrimNode;
|
|
534
|
+
static readonly Stream: typeof TrimStream;
|
|
574
535
|
}
|
|
575
536
|
declare function trim(options?: {
|
|
576
537
|
threshold?: number;
|
|
@@ -581,18 +542,15 @@ declare function trim(options?: {
|
|
|
581
542
|
}): TrimNode;
|
|
582
543
|
|
|
583
544
|
declare class DownmixMonoStream extends UnbufferedTransformStream {
|
|
584
|
-
|
|
545
|
+
_transform(chunk: Block): Generator<Block>;
|
|
585
546
|
}
|
|
586
547
|
declare class DownmixMonoNode extends TransformNode {
|
|
587
548
|
static readonly nodeName = "Downmix Mono";
|
|
588
549
|
static readonly packageName: string;
|
|
589
550
|
static readonly packageVersion: string;
|
|
590
|
-
static readonly
|
|
551
|
+
static readonly description = "Mix all input channels to a single mono channel by averaging";
|
|
591
552
|
static readonly schema: z.ZodObject<{}, z.core.$strip>;
|
|
592
|
-
static readonly
|
|
593
|
-
static is(value: unknown): value is DownmixMonoNode;
|
|
594
|
-
readonly type: readonly ["buffered-audio-node", "transform", "downmix-mono"];
|
|
595
|
-
clone(overrides?: Partial<TransformNodeProperties>): DownmixMonoNode;
|
|
553
|
+
static readonly Stream: typeof DownmixMonoStream;
|
|
596
554
|
}
|
|
597
555
|
declare function downmixMono(options?: {
|
|
598
556
|
id?: string;
|
|
@@ -603,21 +561,18 @@ declare const schema$b: z.ZodObject<{
|
|
|
603
561
|
}, z.core.$strip>;
|
|
604
562
|
interface DuplicateChannelsProperties extends z.infer<typeof schema$b>, TransformNodeProperties {
|
|
605
563
|
}
|
|
606
|
-
declare class DuplicateChannelsStream extends UnbufferedTransformStream<
|
|
607
|
-
|
|
564
|
+
declare class DuplicateChannelsStream extends UnbufferedTransformStream<DuplicateChannelsNode> {
|
|
565
|
+
_transform(chunk: Block): Generator<Block>;
|
|
608
566
|
}
|
|
609
567
|
declare class DuplicateChannelsNode extends TransformNode<DuplicateChannelsProperties> {
|
|
610
568
|
static readonly nodeName = "Duplicate Channels";
|
|
611
569
|
static readonly packageName: string;
|
|
612
570
|
static readonly packageVersion: string;
|
|
613
|
-
static readonly
|
|
571
|
+
static readonly description = "Duplicate a mono signal into multiple identical output channels; requires exactly 1 input channel, throws otherwise";
|
|
614
572
|
static readonly schema: z.ZodObject<{
|
|
615
573
|
channels: z.ZodDefault<z.ZodNumber>;
|
|
616
574
|
}, z.core.$strip>;
|
|
617
|
-
static readonly
|
|
618
|
-
static is(value: unknown): value is DuplicateChannelsNode;
|
|
619
|
-
readonly type: readonly ["buffered-audio-node", "transform", "duplicate-channels"];
|
|
620
|
-
clone(overrides?: Partial<DuplicateChannelsProperties>): DuplicateChannelsNode;
|
|
575
|
+
static readonly Stream: typeof DuplicateChannelsStream;
|
|
621
576
|
}
|
|
622
577
|
declare function duplicateChannels(options?: {
|
|
623
578
|
channels?: number;
|
|
@@ -629,21 +584,18 @@ declare const schema$a: z.ZodObject<{
|
|
|
629
584
|
}, z.core.$strip>;
|
|
630
585
|
interface GainProperties extends z.infer<typeof schema$a>, TransformNodeProperties {
|
|
631
586
|
}
|
|
632
|
-
declare class GainStream extends UnbufferedTransformStream<
|
|
633
|
-
|
|
587
|
+
declare class GainStream extends UnbufferedTransformStream<GainNode> {
|
|
588
|
+
_transform(block: Block): Generator<Block>;
|
|
634
589
|
}
|
|
635
590
|
declare class GainNode extends TransformNode<GainProperties> {
|
|
636
591
|
static readonly nodeName = "Gain";
|
|
637
592
|
static readonly packageName: string;
|
|
638
593
|
static readonly packageVersion: string;
|
|
639
|
-
static readonly
|
|
594
|
+
static readonly description = "Adjust signal level by a fixed amount in dB";
|
|
640
595
|
static readonly schema: z.ZodObject<{
|
|
641
596
|
gain: z.ZodDefault<z.ZodNumber>;
|
|
642
597
|
}, z.core.$strip>;
|
|
643
|
-
static readonly
|
|
644
|
-
static is(value: unknown): value is GainNode;
|
|
645
|
-
readonly type: readonly ["buffered-audio-node", "transform", "gain"];
|
|
646
|
-
clone(overrides?: Partial<GainProperties>): GainNode;
|
|
598
|
+
static readonly Stream: typeof GainStream;
|
|
647
599
|
}
|
|
648
600
|
declare function gain(options?: {
|
|
649
601
|
gain?: number;
|
|
@@ -655,21 +607,18 @@ declare const schema$9: z.ZodObject<{
|
|
|
655
607
|
}, z.core.$strip>;
|
|
656
608
|
interface PanProperties extends z.infer<typeof schema$9>, TransformNodeProperties {
|
|
657
609
|
}
|
|
658
|
-
declare class PanStream extends UnbufferedTransformStream<
|
|
659
|
-
|
|
610
|
+
declare class PanStream extends UnbufferedTransformStream<PanNode> {
|
|
611
|
+
_transform(chunk: Block): Generator<Block>;
|
|
660
612
|
}
|
|
661
613
|
declare class PanNode extends TransformNode<PanProperties> {
|
|
662
614
|
static readonly nodeName = "Pan";
|
|
663
615
|
static readonly packageName: string;
|
|
664
616
|
static readonly packageVersion: string;
|
|
665
|
-
static readonly
|
|
617
|
+
static readonly description = "Position mono signal in stereo field or adjust stereo balance; throws for inputs with more than 2 channels";
|
|
666
618
|
static readonly schema: z.ZodObject<{
|
|
667
619
|
pan: z.ZodDefault<z.ZodNumber>;
|
|
668
620
|
}, z.core.$strip>;
|
|
669
|
-
static readonly
|
|
670
|
-
static is(value: unknown): value is PanNode;
|
|
671
|
-
readonly type: readonly ["buffered-audio-node", "transform", "pan"];
|
|
672
|
-
clone(overrides?: Partial<PanProperties>): PanNode;
|
|
621
|
+
static readonly Stream: typeof PanStream;
|
|
673
622
|
}
|
|
674
623
|
declare function pan(options?: {
|
|
675
624
|
pan?: number;
|
|
@@ -678,13 +627,13 @@ declare function pan(options?: {
|
|
|
678
627
|
|
|
679
628
|
interface FfmpegProperties extends TransformNodeProperties {
|
|
680
629
|
readonly ffmpegPath: string;
|
|
681
|
-
readonly args?: Array<string> | ((context:
|
|
630
|
+
readonly args?: Array<string> | ((context: StreamSetupContext) => Array<string>);
|
|
682
631
|
readonly outputSampleRate?: number;
|
|
683
632
|
}
|
|
684
|
-
declare class FfmpegStream<P extends FfmpegProperties = FfmpegProperties> extends UnbufferedTransformStream<P
|
|
633
|
+
declare class FfmpegStream<P extends FfmpegProperties = FfmpegProperties> extends UnbufferedTransformStream<FfmpegNode<P>> {
|
|
685
634
|
private streamContext?;
|
|
686
635
|
private child?;
|
|
687
|
-
private
|
|
636
|
+
private readonly pending;
|
|
688
637
|
private stdoutStash;
|
|
689
638
|
private outputOffset;
|
|
690
639
|
private stderr;
|
|
@@ -694,28 +643,25 @@ declare class FfmpegStream<P extends FfmpegProperties = FfmpegProperties> extend
|
|
|
694
643
|
private pendingDrain?;
|
|
695
644
|
private inputSampleRate;
|
|
696
645
|
private inputChannels;
|
|
697
|
-
_setup(
|
|
698
|
-
protected _buildArgs(context:
|
|
646
|
+
_setup(context: StreamSetupContext): void;
|
|
647
|
+
protected _buildArgs(context: StreamSetupContext): Array<string>;
|
|
699
648
|
private spawnChild;
|
|
700
649
|
private handleStdoutBytes;
|
|
701
|
-
|
|
702
|
-
|
|
650
|
+
_transform(block: Block): AsyncGenerator<Block>;
|
|
651
|
+
_flush(): AsyncGenerator<Block>;
|
|
703
652
|
_destroy(): Promise<void>;
|
|
704
653
|
}
|
|
705
654
|
declare class FfmpegNode<P extends FfmpegProperties = FfmpegProperties> extends TransformNode<P> {
|
|
706
655
|
static readonly nodeName: string;
|
|
707
656
|
static readonly packageName: string;
|
|
708
657
|
static readonly packageVersion: string;
|
|
709
|
-
static readonly
|
|
658
|
+
static readonly description: string;
|
|
710
659
|
static readonly schema: z.ZodType;
|
|
711
|
-
static readonly
|
|
712
|
-
static is(value: unknown): value is FfmpegNode;
|
|
713
|
-
readonly type: ReadonlyArray<string>;
|
|
714
|
-
clone(overrides?: Partial<P>): FfmpegNode<P>;
|
|
660
|
+
static readonly Stream: typeof FfmpegStream;
|
|
715
661
|
}
|
|
716
662
|
declare function ffmpeg(options: {
|
|
717
663
|
ffmpegPath: string;
|
|
718
|
-
args: Array<string> | ((context:
|
|
664
|
+
args: Array<string> | ((context: StreamSetupContext) => Array<string>);
|
|
719
665
|
outputSampleRate?: number;
|
|
720
666
|
id?: string;
|
|
721
667
|
}): FfmpegNode;
|
|
@@ -734,7 +680,7 @@ declare const schema$8: z.ZodObject<{
|
|
|
734
680
|
}, z.core.$strip>;
|
|
735
681
|
interface LoudnessTargetProperties extends z.infer<typeof schema$8>, TransformNodeProperties {
|
|
736
682
|
}
|
|
737
|
-
declare class LoudnessTargetStream extends BufferedTransformStream<
|
|
683
|
+
declare class LoudnessTargetStream extends BufferedTransformStream<LoudnessTargetNode> {
|
|
738
684
|
blockSize: number;
|
|
739
685
|
private winningSmoothedEnvelopeBuffer;
|
|
740
686
|
private winningB;
|
|
@@ -748,8 +694,8 @@ declare class LoudnessTargetStream extends BufferedTransformStream<LoudnessTarge
|
|
|
748
694
|
detection: number;
|
|
749
695
|
iteration: number;
|
|
750
696
|
};
|
|
751
|
-
|
|
752
|
-
|
|
697
|
+
_prepare(block: Block): Promise<Block>;
|
|
698
|
+
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
753
699
|
private finalize;
|
|
754
700
|
_destroy(): Promise<void>;
|
|
755
701
|
private emitApplied;
|
|
@@ -758,7 +704,7 @@ declare class LoudnessTargetNode extends TransformNode<LoudnessTargetProperties>
|
|
|
758
704
|
static readonly nodeName = "Loudness Target";
|
|
759
705
|
static readonly packageName: string;
|
|
760
706
|
static readonly packageVersion: string;
|
|
761
|
-
static readonly
|
|
707
|
+
static readonly description = "Peak-aware content-adaptive curve fitting (LUFS, true-peak, LRA) via a single combined gain envelope with a peak-respecting two-stage smoother. The upper-arm peak anchor jointly iterates with the body gain to land both LUFS and true-peak targets in one envelope.";
|
|
762
708
|
static readonly schema: z.ZodObject<{
|
|
763
709
|
targetLufs: z.ZodDefault<z.ZodNumber>;
|
|
764
710
|
pivot: z.ZodOptional<z.ZodNumber>;
|
|
@@ -771,10 +717,7 @@ declare class LoudnessTargetNode extends TransformNode<LoudnessTargetProperties>
|
|
|
771
717
|
tolerance: z.ZodDefault<z.ZodNumber>;
|
|
772
718
|
peakTolerance: z.ZodDefault<z.ZodNumber>;
|
|
773
719
|
}, z.core.$strip>;
|
|
774
|
-
static readonly
|
|
775
|
-
static is(value: unknown): value is LoudnessTargetNode;
|
|
776
|
-
readonly type: readonly ["buffered-audio-node", "transform", "loudness-target"];
|
|
777
|
-
clone(overrides?: Partial<LoudnessTargetProperties>): LoudnessTargetNode;
|
|
720
|
+
static readonly Stream: typeof LoudnessTargetStream;
|
|
778
721
|
}
|
|
779
722
|
declare function loudnessTarget(options: {
|
|
780
723
|
targetLufs?: number;
|
|
@@ -795,24 +738,21 @@ declare const schema$7: z.ZodObject<{
|
|
|
795
738
|
}, z.core.$strip>;
|
|
796
739
|
interface LoudnessNormalizeProperties extends z.infer<typeof schema$7>, TransformNodeProperties {
|
|
797
740
|
}
|
|
798
|
-
declare class LoudnessNormalizeStream extends BufferedTransformStream<
|
|
741
|
+
declare class LoudnessNormalizeStream extends BufferedTransformStream<LoudnessNormalizeNode> {
|
|
799
742
|
blockSize: number;
|
|
800
743
|
private accumulator?;
|
|
801
|
-
|
|
802
|
-
|
|
744
|
+
_prepare(block: Block): Block;
|
|
745
|
+
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
803
746
|
}
|
|
804
747
|
declare class LoudnessNormalizeNode extends TransformNode<LoudnessNormalizeProperties> {
|
|
805
748
|
static readonly nodeName = "Loudness Normalize";
|
|
806
749
|
static readonly packageName: string;
|
|
807
750
|
static readonly packageVersion: string;
|
|
808
|
-
static readonly
|
|
751
|
+
static readonly description = "Measure integrated loudness (BS.1770) and apply a single linear gain to hit a target LUFS \u2014 no limiting, no dynamics";
|
|
809
752
|
static readonly schema: z.ZodObject<{
|
|
810
753
|
target: z.ZodDefault<z.ZodNumber>;
|
|
811
754
|
}, z.core.$strip>;
|
|
812
|
-
static readonly
|
|
813
|
-
static is(value: unknown): value is LoudnessNormalizeNode;
|
|
814
|
-
readonly type: readonly ["buffered-audio-node", "transform", "loudness-normalize"];
|
|
815
|
-
clone(overrides?: Partial<LoudnessNormalizeProperties>): LoudnessNormalizeNode;
|
|
755
|
+
static readonly Stream: typeof LoudnessNormalizeStream;
|
|
816
756
|
}
|
|
817
757
|
declare function loudnessNormalize(options?: {
|
|
818
758
|
target?: number;
|
|
@@ -824,25 +764,22 @@ declare const schema$6: z.ZodObject<{
|
|
|
824
764
|
}, z.core.$strip>;
|
|
825
765
|
interface TruePeakNormalizeProperties extends z.infer<typeof schema$6>, TransformNodeProperties {
|
|
826
766
|
}
|
|
827
|
-
declare class TruePeakNormalizeStream extends BufferedTransformStream<
|
|
767
|
+
declare class TruePeakNormalizeStream extends BufferedTransformStream<TruePeakNormalizeNode> {
|
|
828
768
|
blockSize: number;
|
|
829
769
|
private accumulator?;
|
|
830
|
-
|
|
831
|
-
|
|
770
|
+
_prepare(block: Block): Block;
|
|
771
|
+
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
832
772
|
private resolveGain;
|
|
833
773
|
}
|
|
834
774
|
declare class TruePeakNormalizeNode extends TransformNode<TruePeakNormalizeProperties> {
|
|
835
775
|
static readonly nodeName = "True Peak Normalize";
|
|
836
776
|
static readonly packageName: string;
|
|
837
777
|
static readonly packageVersion: string;
|
|
838
|
-
static readonly
|
|
778
|
+
static readonly description = "Measure source true peak (4\u00D7 upsampled, BS.1770-4 style) and apply a single linear gain to hit a target dBTP";
|
|
839
779
|
static readonly schema: z.ZodObject<{
|
|
840
780
|
target: z.ZodDefault<z.ZodNumber>;
|
|
841
781
|
}, z.core.$strip>;
|
|
842
|
-
static readonly
|
|
843
|
-
static is(value: unknown): value is TruePeakNormalizeNode;
|
|
844
|
-
readonly type: readonly ["buffered-audio-node", "transform", "true-peak-normalize"];
|
|
845
|
-
clone(overrides?: Partial<TruePeakNormalizeProperties>): TruePeakNormalizeNode;
|
|
782
|
+
static readonly Stream: typeof TruePeakNormalizeStream;
|
|
846
783
|
}
|
|
847
784
|
declare function truePeakNormalize(options?: {
|
|
848
785
|
target?: number;
|
|
@@ -857,31 +794,28 @@ declare const schema$5: z.ZodObject<{
|
|
|
857
794
|
}, z.core.$strip>;
|
|
858
795
|
interface CrestReduceProperties extends z.infer<typeof schema$5>, TransformNodeProperties {
|
|
859
796
|
}
|
|
860
|
-
declare class CrestReduceStream extends BufferedTransformStream<
|
|
797
|
+
declare class CrestReduceStream extends BufferedTransformStream<CrestReduceNode> {
|
|
861
798
|
blockSize: number;
|
|
862
799
|
private fftBackend?;
|
|
863
800
|
private fftAddonOptions?;
|
|
864
801
|
private truePeakAccumulator?;
|
|
865
|
-
_setup(
|
|
802
|
+
_setup(context: StreamSetupContext): void;
|
|
866
803
|
private get hopSize();
|
|
867
|
-
|
|
868
|
-
|
|
804
|
+
_prepare(block: Block): Block;
|
|
805
|
+
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
869
806
|
}
|
|
870
807
|
declare class CrestReduceNode extends TransformNode<CrestReduceProperties> {
|
|
871
808
|
static readonly nodeName = "Crest Reduce";
|
|
872
809
|
static readonly packageName: string;
|
|
873
810
|
static readonly packageVersion: string;
|
|
874
|
-
static readonly
|
|
811
|
+
static readonly description = "Content-adaptive, magnitude-preserving, phase-only crest-factor reducer \u2014 a pre-limiter headroom stage that rearranges signal phase to flatten true-peak excursions without changing the magnitude spectrum, never increasing crest factor";
|
|
875
812
|
static readonly schema: z.ZodObject<{
|
|
876
813
|
smoothing: z.ZodDefault<z.ZodNumber>;
|
|
877
814
|
frameSize: z.ZodDefault<z.ZodNumber>;
|
|
878
815
|
vkfftAddonPath: z.ZodDefault<z.ZodString>;
|
|
879
816
|
fftwAddonPath: z.ZodDefault<z.ZodString>;
|
|
880
817
|
}, z.core.$strip>;
|
|
881
|
-
static readonly
|
|
882
|
-
static is(value: unknown): value is CrestReduceNode;
|
|
883
|
-
readonly type: readonly ["buffered-audio-node", "transform", "crest-reduce"];
|
|
884
|
-
clone(overrides?: Partial<CrestReduceProperties>): CrestReduceNode;
|
|
818
|
+
static readonly Stream: typeof CrestReduceStream;
|
|
885
819
|
}
|
|
886
820
|
declare function crestReduce(options?: {
|
|
887
821
|
smoothing?: number;
|
|
@@ -909,7 +843,7 @@ declare const schema$4: z.ZodObject<{
|
|
|
909
843
|
}, z.core.$strip>;
|
|
910
844
|
interface DeBleedProperties extends z.infer<typeof schema$4>, TransformNodeProperties {
|
|
911
845
|
}
|
|
912
|
-
declare class DeBleedStream extends BufferedTransformStream<
|
|
846
|
+
declare class DeBleedStream extends BufferedTransformStream<DeBleedNode> {
|
|
913
847
|
blockSize: number;
|
|
914
848
|
private fftBackend?;
|
|
915
849
|
private fftAddonOptions?;
|
|
@@ -918,16 +852,17 @@ declare class DeBleedStream extends BufferedTransformStream<DeBleedProperties> {
|
|
|
918
852
|
private referenceBuffers;
|
|
919
853
|
private chunkFrames;
|
|
920
854
|
private numBins;
|
|
921
|
-
|
|
855
|
+
private nlmPool?;
|
|
856
|
+
_setup(context: StreamSetupContext): Promise<void>;
|
|
922
857
|
_destroy(): Promise<void>;
|
|
923
858
|
private warmupSeedsAllChannels;
|
|
924
|
-
|
|
859
|
+
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
925
860
|
}
|
|
926
861
|
declare class DeBleedNode extends TransformNode<DeBleedProperties> {
|
|
927
862
|
static readonly nodeName = "De-Bleed Adaptive";
|
|
928
863
|
static readonly packageName: string;
|
|
929
864
|
static readonly packageVersion: string;
|
|
930
|
-
static readonly
|
|
865
|
+
static readonly description = "Adaptive (MEF FDAF Kalman + MWF + MSAD) reference-based microphone bleed reduction. Stages 1+2 are MEF Meyer-Elshamy-Fingscheidt 2020; Stage 3 is Lukin-Todd 2D NLM+DFTT post-filter.";
|
|
931
866
|
static readonly schema: z.ZodObject<{
|
|
932
867
|
references: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
933
868
|
reductionStrength: z.ZodDefault<z.ZodNumber>;
|
|
@@ -944,10 +879,7 @@ declare class DeBleedNode extends TransformNode<DeBleedProperties> {
|
|
|
944
879
|
js: "js";
|
|
945
880
|
}>>;
|
|
946
881
|
}, z.core.$strip>;
|
|
947
|
-
static readonly
|
|
948
|
-
static is(value: unknown): value is DeBleedNode;
|
|
949
|
-
readonly type: readonly ["buffered-audio-node", "transform", "de-bleed"];
|
|
950
|
-
clone(overrides?: Partial<DeBleedProperties>): DeBleedNode;
|
|
882
|
+
static readonly Stream: typeof DeBleedStream;
|
|
951
883
|
}
|
|
952
884
|
declare function deBleed(references: string | ReadonlyArray<string>, options?: {
|
|
953
885
|
reductionStrength?: number;
|
|
@@ -970,19 +902,24 @@ declare const schema$3: z.ZodObject<{
|
|
|
970
902
|
}, z.core.$strip>;
|
|
971
903
|
interface DeepFilterNet3Properties extends z.infer<typeof schema$3>, TransformNodeProperties {
|
|
972
904
|
}
|
|
973
|
-
declare class DeepFilterNet3Stream extends BufferedTransformStream<
|
|
905
|
+
declare class DeepFilterNet3Stream extends BufferedTransformStream<DeepFilterNet3Node> {
|
|
974
906
|
blockSize: number;
|
|
975
907
|
private session?;
|
|
976
908
|
private dfnStates;
|
|
977
|
-
|
|
978
|
-
|
|
909
|
+
private readonly renderContext;
|
|
910
|
+
private upResample?;
|
|
911
|
+
private downResample?;
|
|
912
|
+
constructor(node: DeepFilterNet3Node, context: StreamContext);
|
|
913
|
+
_setup(context: StreamSetupContext): void;
|
|
914
|
+
_pipe(input: ReadableStream<Block>): ReadableStream<Block>;
|
|
915
|
+
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
979
916
|
_destroy(): void;
|
|
980
917
|
}
|
|
981
918
|
declare class DeepFilterNet3Node extends TransformNode<DeepFilterNet3Properties> {
|
|
982
919
|
static readonly nodeName = "DeepFilterNet3 (Denoiser)";
|
|
983
920
|
static readonly packageName: string;
|
|
984
921
|
static readonly packageVersion: string;
|
|
985
|
-
static readonly
|
|
922
|
+
static readonly description = "Remove background noise from speech using DeepFilterNet3 (48 kHz full-band CRN)";
|
|
986
923
|
static readonly schema: z.ZodObject<{
|
|
987
924
|
modelPath: z.ZodDefault<z.ZodString>;
|
|
988
925
|
ffmpegPath: z.ZodDefault<z.ZodString>;
|
|
@@ -990,10 +927,7 @@ declare class DeepFilterNet3Node extends TransformNode<DeepFilterNet3Properties>
|
|
|
990
927
|
sampleRate: z.ZodNumber;
|
|
991
928
|
attenuation: z.ZodDefault<z.ZodNumber>;
|
|
992
929
|
}, z.core.$strip>;
|
|
993
|
-
static readonly
|
|
994
|
-
static is(value: unknown): value is DeepFilterNet3Node;
|
|
995
|
-
readonly type: readonly ["buffered-audio-node", "transform", "deep-filter-net-3"];
|
|
996
|
-
clone(overrides?: Partial<DeepFilterNet3Properties>): DeepFilterNet3Node;
|
|
930
|
+
static readonly Stream: typeof DeepFilterNet3Stream;
|
|
997
931
|
}
|
|
998
932
|
declare function deepFilterNet3(options: {
|
|
999
933
|
modelPath: string;
|
|
@@ -1014,21 +948,21 @@ declare const schema$2: z.ZodObject<{
|
|
|
1014
948
|
}, z.core.$strip>;
|
|
1015
949
|
interface DtlnProperties extends z.infer<typeof schema$2>, TransformNodeProperties {
|
|
1016
950
|
}
|
|
1017
|
-
declare class DtlnStream extends BufferedTransformStream<
|
|
951
|
+
declare class DtlnStream extends BufferedTransformStream<DtlnNode> {
|
|
1018
952
|
blockSize: number;
|
|
1019
953
|
private session1;
|
|
1020
954
|
private session2;
|
|
1021
955
|
private fftBackend?;
|
|
1022
956
|
private fftAddonOptions?;
|
|
1023
|
-
_setup(
|
|
1024
|
-
|
|
957
|
+
_setup(context: StreamSetupContext): void;
|
|
958
|
+
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
1025
959
|
private runMainPass;
|
|
1026
960
|
}
|
|
1027
961
|
declare class DtlnNode extends TransformNode<DtlnProperties> {
|
|
1028
962
|
static readonly nodeName = "DTLN (Denoiser)";
|
|
1029
963
|
static readonly packageName: string;
|
|
1030
964
|
static readonly packageVersion: string;
|
|
1031
|
-
static readonly
|
|
965
|
+
static readonly description = "Remove background noise from speech using DTLN neural network";
|
|
1032
966
|
static readonly schema: z.ZodObject<{
|
|
1033
967
|
modelPath1: z.ZodDefault<z.ZodString>;
|
|
1034
968
|
modelPath2: z.ZodDefault<z.ZodString>;
|
|
@@ -1037,10 +971,7 @@ declare class DtlnNode extends TransformNode<DtlnProperties> {
|
|
|
1037
971
|
vkfftAddonPath: z.ZodDefault<z.ZodString>;
|
|
1038
972
|
fftwAddonPath: z.ZodDefault<z.ZodString>;
|
|
1039
973
|
}, z.core.$strip>;
|
|
1040
|
-
static readonly
|
|
1041
|
-
static is(value: unknown): value is DtlnNode;
|
|
1042
|
-
readonly type: readonly ["buffered-audio-node", "transform", "dtln"];
|
|
1043
|
-
clone(overrides?: Partial<DtlnProperties>): DtlnNode;
|
|
974
|
+
static readonly Stream: typeof DtlnStream;
|
|
1044
975
|
}
|
|
1045
976
|
declare function dtln(options: {
|
|
1046
977
|
modelPath1: string;
|
|
@@ -1068,11 +999,11 @@ declare const schema$1: z.ZodObject<{
|
|
|
1068
999
|
interface HtdemucsProperties extends z.infer<typeof schema$1>, TransformNodeProperties {
|
|
1069
1000
|
readonly stems: StemGains;
|
|
1070
1001
|
}
|
|
1071
|
-
declare class HtdemucsStream extends BufferedTransformStream<
|
|
1002
|
+
declare class HtdemucsStream extends BufferedTransformStream<HtdemucsNode> {
|
|
1072
1003
|
blockSize: number;
|
|
1073
1004
|
private session;
|
|
1074
|
-
_setup(
|
|
1075
|
-
|
|
1005
|
+
_setup(_context: StreamSetupContext): void;
|
|
1006
|
+
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
1076
1007
|
private runMainPass;
|
|
1077
1008
|
private emitStable;
|
|
1078
1009
|
}
|
|
@@ -1080,7 +1011,7 @@ declare class HtdemucsNode extends TransformNode<HtdemucsProperties> {
|
|
|
1080
1011
|
static readonly nodeName = "HTDemucs (Stem Separator)";
|
|
1081
1012
|
static readonly packageName: string;
|
|
1082
1013
|
static readonly packageVersion: string;
|
|
1083
|
-
static readonly
|
|
1014
|
+
static readonly description = "Rebalance stem volumes using HTDemucs source separation";
|
|
1084
1015
|
static readonly schema: z.ZodObject<{
|
|
1085
1016
|
modelPath: z.ZodDefault<z.ZodString>;
|
|
1086
1017
|
ffmpegPath: z.ZodDefault<z.ZodString>;
|
|
@@ -1088,10 +1019,7 @@ declare class HtdemucsNode extends TransformNode<HtdemucsProperties> {
|
|
|
1088
1019
|
highPass: z.ZodDefault<z.ZodNumber>;
|
|
1089
1020
|
lowPass: z.ZodDefault<z.ZodNumber>;
|
|
1090
1021
|
}, z.core.$strip>;
|
|
1091
|
-
static readonly
|
|
1092
|
-
static is(value: unknown): value is HtdemucsNode;
|
|
1093
|
-
readonly type: readonly ["buffered-audio-node", "transform", "htdemucs"];
|
|
1094
|
-
clone(overrides?: Partial<HtdemucsProperties>): HtdemucsNode;
|
|
1022
|
+
static readonly Stream: typeof HtdemucsStream;
|
|
1095
1023
|
}
|
|
1096
1024
|
declare function htdemucs(modelPath: string, stems: Partial<StemGains>, options?: {
|
|
1097
1025
|
ffmpegPath?: string;
|
|
@@ -1108,13 +1036,13 @@ declare const schema: z.ZodObject<{
|
|
|
1108
1036
|
}, z.core.$strip>;
|
|
1109
1037
|
interface KimVocal2Properties extends z.infer<typeof schema>, TransformNodeProperties {
|
|
1110
1038
|
}
|
|
1111
|
-
declare class KimVocal2Stream extends BufferedTransformStream<
|
|
1039
|
+
declare class KimVocal2Stream extends BufferedTransformStream<KimVocal2Node> {
|
|
1112
1040
|
blockSize: number;
|
|
1113
1041
|
private session;
|
|
1114
1042
|
private fftInstance;
|
|
1115
|
-
constructor(node:
|
|
1116
|
-
_setup(
|
|
1117
|
-
|
|
1043
|
+
constructor(node: KimVocal2Node, context: StreamContext);
|
|
1044
|
+
_setup(context: StreamSetupContext): void;
|
|
1045
|
+
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
1118
1046
|
private runMainPass;
|
|
1119
1047
|
private emitStable;
|
|
1120
1048
|
}
|
|
@@ -1122,7 +1050,7 @@ declare class KimVocal2Node extends TransformNode<KimVocal2Properties> {
|
|
|
1122
1050
|
static readonly nodeName = "Kim Vocal 2 (Stem Separator)";
|
|
1123
1051
|
static readonly packageName: string;
|
|
1124
1052
|
static readonly packageVersion: string;
|
|
1125
|
-
static readonly
|
|
1053
|
+
static readonly description = "Isolate dialogue from background using MDX-Net vocal separation";
|
|
1126
1054
|
static readonly schema: z.ZodObject<{
|
|
1127
1055
|
modelPath: z.ZodDefault<z.ZodString>;
|
|
1128
1056
|
ffmpegPath: z.ZodDefault<z.ZodString>;
|
|
@@ -1130,10 +1058,7 @@ declare class KimVocal2Node extends TransformNode<KimVocal2Properties> {
|
|
|
1130
1058
|
highPass: z.ZodDefault<z.ZodNumber>;
|
|
1131
1059
|
lowPass: z.ZodDefault<z.ZodNumber>;
|
|
1132
1060
|
}, z.core.$strip>;
|
|
1133
|
-
static readonly
|
|
1134
|
-
static is(value: unknown): value is KimVocal2Node;
|
|
1135
|
-
readonly type: readonly ["buffered-audio-node", "transform", "kim-vocal-2"];
|
|
1136
|
-
clone(overrides?: Partial<KimVocal2Properties>): KimVocal2Node;
|
|
1061
|
+
static readonly Stream: typeof KimVocal2Stream;
|
|
1137
1062
|
}
|
|
1138
1063
|
declare function kimVocal2(options: {
|
|
1139
1064
|
modelPath: string;
|
|
@@ -1156,25 +1081,22 @@ interface Vst3Properties extends TransformNodeProperties {
|
|
|
1156
1081
|
readonly bypass?: boolean;
|
|
1157
1082
|
readonly extraArgs?: ReadonlyArray<string>;
|
|
1158
1083
|
}
|
|
1159
|
-
declare class Vst3Stream<P extends Vst3Properties = Vst3Properties> extends BufferedTransformStream<P
|
|
1084
|
+
declare class Vst3Stream<P extends Vst3Properties = Vst3Properties> extends BufferedTransformStream<Vst3Node<P>> {
|
|
1160
1085
|
blockSize: number;
|
|
1161
1086
|
private streamContext?;
|
|
1162
1087
|
private stagesJsonPath?;
|
|
1163
1088
|
private stagesJsonCleanup?;
|
|
1164
|
-
_setup(
|
|
1165
|
-
|
|
1089
|
+
_setup(context: StreamSetupContext): Promise<void>;
|
|
1090
|
+
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
1166
1091
|
_destroy(): Promise<void>;
|
|
1167
1092
|
}
|
|
1168
1093
|
declare class Vst3Node<P extends Vst3Properties = Vst3Properties> extends TransformNode<P> {
|
|
1169
1094
|
static readonly nodeName: string;
|
|
1170
1095
|
static readonly packageName: string;
|
|
1171
1096
|
static readonly packageVersion: string;
|
|
1172
|
-
static readonly
|
|
1097
|
+
static readonly description: string;
|
|
1173
1098
|
static readonly schema: z.ZodType;
|
|
1174
|
-
static readonly
|
|
1175
|
-
static is(value: unknown): value is Vst3Node;
|
|
1176
|
-
readonly type: ReadonlyArray<string>;
|
|
1177
|
-
clone(overrides?: Partial<P>): Vst3Node<P>;
|
|
1099
|
+
static readonly Stream: typeof Vst3Stream;
|
|
1178
1100
|
}
|
|
1179
1101
|
declare function vst3(options: {
|
|
1180
1102
|
vstHostPath: string;
|