fix
This commit is contained in:
parent
b7416c7c2b
commit
539e2a4ab8
1 changed files with 10 additions and 3 deletions
|
|
@ -23,7 +23,7 @@ const state = {
|
|||
muted: false,
|
||||
sharingVideo: false,
|
||||
sharingScreen: false,
|
||||
noiseFilterMode: 'deepfilter',
|
||||
noiseFilterMode: 'off',
|
||||
activeNoiseFilter: 'off',
|
||||
deepFilterProcessor: null,
|
||||
deepFilterModule: null,
|
||||
|
|
@ -805,8 +805,15 @@ async function buildAudioPipeline(rawStream) {
|
|||
sampleRate: 48000,
|
||||
noiseReductionLevel: 70,
|
||||
});
|
||||
await processor.initialize();
|
||||
const workletNode = await processor.createAudioWorkletNode(ctx);
|
||||
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");
|
||||
processor.setNoiseSuppressionEnabled(true);
|
||||
state.voice.deepFilterProcessor = processor;
|
||||
source.connect(workletNode);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue