@buffered-audio/nodes 0.23.0 → 0.24.2
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 +3 -4
- package/dist/{chunk-YJWZP2OD.js → chunk-BKEMKXGG.js} +672 -531
- package/dist/index.d.ts +25 -10
- package/dist/index.js +1002 -927
- package/dist/nlm-worker.js +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -237,7 +237,7 @@ declare function waveform(outputPath: string, options?: {
|
|
|
237
237
|
type WavBitDepth = "16" | "24" | "32" | "32f";
|
|
238
238
|
interface EncodingOptions {
|
|
239
239
|
readonly format: "wav" | "flac" | "mp3" | "aac";
|
|
240
|
-
readonly bitrate?:
|
|
240
|
+
readonly bitrate?: number;
|
|
241
241
|
readonly vbr?: number;
|
|
242
242
|
readonly sampleRate?: number;
|
|
243
243
|
}
|
|
@@ -287,7 +287,7 @@ declare class WriteNode extends TargetNode<WriteProperties> {
|
|
|
287
287
|
mp3: "mp3";
|
|
288
288
|
aac: "aac";
|
|
289
289
|
}>;
|
|
290
|
-
bitrate: z.ZodOptional<z.
|
|
290
|
+
bitrate: z.ZodOptional<z.ZodNumber>;
|
|
291
291
|
vbr: z.ZodOptional<z.ZodNumber>;
|
|
292
292
|
sampleRate: z.ZodOptional<z.ZodNumber>;
|
|
293
293
|
}, z.core.$strip>>;
|
|
@@ -615,20 +615,24 @@ interface FfmpegProperties extends TransformNodeProperties {
|
|
|
615
615
|
declare class FfmpegStream<P extends FfmpegProperties = FfmpegProperties> extends UnbufferedTransformStream<FfmpegNode<P>> {
|
|
616
616
|
private streamContext?;
|
|
617
617
|
private child?;
|
|
618
|
-
private readonly pending;
|
|
619
618
|
private stdoutStash;
|
|
620
619
|
private outputOffset;
|
|
621
620
|
private stderr;
|
|
622
621
|
private stdinError?;
|
|
623
622
|
private exitPromise?;
|
|
624
|
-
private
|
|
623
|
+
private stdoutEnded;
|
|
624
|
+
private stdoutWait?;
|
|
625
|
+
private stdoutNotify?;
|
|
625
626
|
private pendingDrain?;
|
|
626
627
|
private inputSampleRate;
|
|
627
628
|
private inputChannels;
|
|
628
629
|
_setup(context: StreamSetupContext): void;
|
|
629
630
|
protected _buildArgs(context: StreamSetupContext): Array<string>;
|
|
630
631
|
private spawnChild;
|
|
631
|
-
private
|
|
632
|
+
private wakeStdout;
|
|
633
|
+
private readAvailableStdout;
|
|
634
|
+
private waitForStdoutReadableOrEnd;
|
|
635
|
+
private serveWhileParked;
|
|
632
636
|
_transform(block: Block): AsyncGenerator<Block>;
|
|
633
637
|
_flush(): AsyncGenerator<Block>;
|
|
634
638
|
_destroy(): Promise<void>;
|
|
@@ -873,7 +877,6 @@ declare const schema$3: z.ZodObject<{
|
|
|
873
877
|
modelPath: z.ZodDefault<z.ZodString>;
|
|
874
878
|
ffmpegPath: z.ZodDefault<z.ZodString>;
|
|
875
879
|
onnxAddonPath: z.ZodDefault<z.ZodString>;
|
|
876
|
-
sampleRate: z.ZodNumber;
|
|
877
880
|
attenuation: z.ZodDefault<z.ZodNumber>;
|
|
878
881
|
}, z.core.$strip>;
|
|
879
882
|
interface DeepFilterNet3Properties extends z.infer<typeof schema$3>, TransformNodeProperties {
|
|
@@ -894,19 +897,17 @@ declare class DeepFilterNet3Stream extends BufferedTransformStream<DeepFilterNet
|
|
|
894
897
|
declare class DeepFilterNet3Node extends TransformNode<DeepFilterNet3Properties> {
|
|
895
898
|
static readonly nodeName = "DeepFilterNet3 (Denoiser)";
|
|
896
899
|
static readonly packageName: string;
|
|
897
|
-
static readonly description = "Remove background noise from speech using DeepFilterNet3 (48 kHz full-band CRN)";
|
|
900
|
+
static readonly description = "Remove background noise from speech using DeepFilterNet3 (48 kHz full-band CRN). At other source rates, the internal resampling round trip may add or drop up to two source-rate frames.";
|
|
898
901
|
static readonly schema: z.ZodObject<{
|
|
899
902
|
modelPath: z.ZodDefault<z.ZodString>;
|
|
900
903
|
ffmpegPath: z.ZodDefault<z.ZodString>;
|
|
901
904
|
onnxAddonPath: z.ZodDefault<z.ZodString>;
|
|
902
|
-
sampleRate: z.ZodNumber;
|
|
903
905
|
attenuation: z.ZodDefault<z.ZodNumber>;
|
|
904
906
|
}, z.core.$strip>;
|
|
905
907
|
static readonly Stream: typeof DeepFilterNet3Stream;
|
|
906
908
|
}
|
|
907
909
|
declare function deepFilterNet3(options: {
|
|
908
910
|
modelPath: string;
|
|
909
|
-
sampleRate: number;
|
|
910
911
|
ffmpegPath?: string;
|
|
911
912
|
onnxAddonPath?: string;
|
|
912
913
|
attenuation?: number;
|
|
@@ -929,7 +930,12 @@ declare class DtlnStream extends BufferedTransformStream<DtlnNode> {
|
|
|
929
930
|
private session2;
|
|
930
931
|
private fftBackend?;
|
|
931
932
|
private fftAddonOptions?;
|
|
933
|
+
private readonly renderContext;
|
|
934
|
+
private upResample?;
|
|
935
|
+
private downResample?;
|
|
936
|
+
constructor(node: DtlnNode, context: StreamContext);
|
|
932
937
|
_setup(context: StreamSetupContext): void;
|
|
938
|
+
_pipe(input: ReadableStream<Block>): ReadableStream<Block>;
|
|
933
939
|
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
934
940
|
private runMainPass;
|
|
935
941
|
}
|
|
@@ -976,7 +982,12 @@ interface HtdemucsProperties extends z.infer<typeof schema$1>, TransformNodeProp
|
|
|
976
982
|
declare class HtdemucsStream extends BufferedTransformStream<HtdemucsNode> {
|
|
977
983
|
blockSize: number;
|
|
978
984
|
private session;
|
|
979
|
-
|
|
985
|
+
private readonly renderContext;
|
|
986
|
+
private upResample?;
|
|
987
|
+
private downResample?;
|
|
988
|
+
constructor(node: HtdemucsNode, context: StreamContext);
|
|
989
|
+
_setup(context: StreamSetupContext): void;
|
|
990
|
+
_pipe(input: ReadableStream<Block>): ReadableStream<Block>;
|
|
980
991
|
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
981
992
|
private runMainPass;
|
|
982
993
|
private emitStable;
|
|
@@ -1013,8 +1024,12 @@ declare class KimVocal2Stream extends BufferedTransformStream<KimVocal2Node> {
|
|
|
1013
1024
|
blockSize: number;
|
|
1014
1025
|
private session;
|
|
1015
1026
|
private fftInstance;
|
|
1027
|
+
private readonly renderContext;
|
|
1028
|
+
private upResample?;
|
|
1029
|
+
private downResample?;
|
|
1016
1030
|
constructor(node: KimVocal2Node, context: StreamContext);
|
|
1017
1031
|
_setup(context: StreamSetupContext): void;
|
|
1032
|
+
_pipe(input: ReadableStream<Block>): ReadableStream<Block>;
|
|
1018
1033
|
_transform(buffered: BlockBuffer): AsyncGenerator<Block>;
|
|
1019
1034
|
private runMainPass;
|
|
1020
1035
|
private emitStable;
|