fix(calls): revert DTLN/DFN3 and ensure stable suppression build
- Remove non-functional DTLN and DFN3 dependencies and UI options. - Maintain stability by keeping only tested and working suppression models (RNNoise, Speex). - Verified that build passes and all assets are correctly bundled.
This commit is contained in:
+5
-30
@@ -54,14 +54,6 @@
|
|||||||
script: 'speexWorklet.js',
|
script: 'speexWorklet.js',
|
||||||
wasm: 'speex.wasm',
|
wasm: 'speex.wasm',
|
||||||
},
|
},
|
||||||
dtln: {
|
|
||||||
name: 'dtln-processor',
|
|
||||||
script: 'dtlnWorklet.js',
|
|
||||||
},
|
|
||||||
deepfilternet: {
|
|
||||||
name: 'deepfilter-audio-processor',
|
|
||||||
script: 'dfn3Worklet.js',
|
|
||||||
},
|
|
||||||
gate: {
|
gate: {
|
||||||
name: '@sapphi-red/web-noise-suppressor/noise-gate',
|
name: '@sapphi-red/web-noise-suppressor/noise-gate',
|
||||||
script: 'noiseGateWorklet.js',
|
script: 'noiseGateWorklet.js',
|
||||||
@@ -156,31 +148,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 2. ML Processor
|
// 2. ML Processor
|
||||||
var mlOptions = {
|
var mlNode = new AudioWorkletNode(ctx, PROCESSORS[MODEL].name, {
|
||||||
channelCount: 1,
|
channelCount: 1,
|
||||||
|
channelCountMode: 'explicit',
|
||||||
numberOfInputs: 1,
|
numberOfInputs: 1,
|
||||||
numberOfOutputs: 1,
|
numberOfOutputs: 1,
|
||||||
processorOptions: { maxChannels: 1 }
|
outputChannelCount: [1],
|
||||||
};
|
processorOptions: { maxChannels: 1, wasmBinary: wasmBinary },
|
||||||
|
});
|
||||||
if (MODEL === 'rnnoise' || MODEL === 'speex') {
|
|
||||||
mlOptions.processorOptions.wasmBinary = wasmBinary;
|
|
||||||
} else if (MODEL === 'dtln') {
|
|
||||||
mlOptions.processorOptions = {
|
|
||||||
wasmUrl: ASSET_BASE + 'litert_wasm_internal.wasm',
|
|
||||||
model1Url: ASSET_BASE + 'model_1.tflite',
|
|
||||||
model2Url: ASSET_BASE + 'model_2.tflite',
|
|
||||||
processorUrl: ASSET_BASE + 'dtlnProcessor.js'
|
|
||||||
};
|
|
||||||
} else if (MODEL === 'deepfilternet') {
|
|
||||||
mlOptions.processorOptions = {
|
|
||||||
wasmModule: wasmBinary,
|
|
||||||
modelBytes: new Uint8Array(wasmBinary),
|
|
||||||
suppressionLevel: 50
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
var mlNode = new AudioWorkletNode(ctx, PROCESSORS[MODEL].name, mlOptions);
|
|
||||||
head.connect(mlNode);
|
head.connect(mlNode);
|
||||||
mlNode.connect(dest);
|
mlNode.connect(dest);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user