diff --git a/desktop/app.js b/desktop/app.js index 530bc53..9f38df5 100644 --- a/desktop/app.js +++ b/desktop/app.js @@ -23,7 +23,7 @@ const state = { muted: false, sharingVideo: false, sharingScreen: false, - noiseFilterMode: 'off', + noiseFilterMode: 'deepfilter', activeNoiseFilter: 'off', deepFilterProcessor: null, deepFilterModule: null, @@ -805,15 +805,8 @@ async function buildAudioPipeline(rawStream) { sampleRate: 48000, noiseReductionLevel: 70, }); - const timeoutMs = 2500; - const withTimeout = (promise, label) => - Promise.race([ - promise, - new Promise((_, reject) => setTimeout(() => reject(new Error(`${label} timed out`)), timeoutMs)), - ]); - - await withTimeout(processor.initialize(), "DeepFilter initialize"); - const workletNode = await withTimeout(processor.createAudioWorkletNode(ctx), "DeepFilter worklet"); + await processor.initialize(); + const workletNode = await processor.createAudioWorkletNode(ctx); processor.setNoiseSuppressionEnabled(true); state.voice.deepFilterProcessor = processor; source.connect(workletNode); diff --git a/static/app.js b/static/app.js index bad7f22..0295176 100644 --- a/static/app.js +++ b/static/app.js @@ -23,7 +23,7 @@ const state = { muted: false, sharingVideo: false, sharingScreen: false, - noiseFilterMode: 'off', + noiseFilterMode: 'deepfilter', activeNoiseFilter: 'off', deepFilterProcessor: null, deepFilterModule: null, @@ -767,15 +767,8 @@ async function buildAudioPipeline(rawStream) { sampleRate: 48000, noiseReductionLevel: 70, }); - const timeoutMs = 2500; - const withTimeout = (promise, label) => - Promise.race([ - promise, - new Promise((_, reject) => setTimeout(() => reject(new Error(`${label} timed out`)), timeoutMs)), - ]); - - await withTimeout(processor.initialize(), "DeepFilter initialize"); - const workletNode = await withTimeout(processor.createAudioWorkletNode(ctx), "DeepFilter worklet"); + await processor.initialize(); + const workletNode = await processor.createAudioWorkletNode(ctx); processor.setNoiseSuppressionEnabled(true); state.voice.deepFilterProcessor = processor; source.connect(workletNode);