Compare commits
No commits in common. "6f9c24ac606725c78ad0b31ab772d6268a117f98" and "b7416c7c2b37c5e62e336b9dcbf0f065c9b8acde" have entirely different histories.
6f9c24ac60
...
b7416c7c2b
2 changed files with 6 additions and 20 deletions
|
|
@ -23,7 +23,7 @@ const state = {
|
||||||
muted: false,
|
muted: false,
|
||||||
sharingVideo: false,
|
sharingVideo: false,
|
||||||
sharingScreen: false,
|
sharingScreen: false,
|
||||||
noiseFilterMode: 'off',
|
noiseFilterMode: 'deepfilter',
|
||||||
activeNoiseFilter: 'off',
|
activeNoiseFilter: 'off',
|
||||||
deepFilterProcessor: null,
|
deepFilterProcessor: null,
|
||||||
deepFilterModule: null,
|
deepFilterModule: null,
|
||||||
|
|
@ -805,15 +805,8 @@ async function buildAudioPipeline(rawStream) {
|
||||||
sampleRate: 48000,
|
sampleRate: 48000,
|
||||||
noiseReductionLevel: 70,
|
noiseReductionLevel: 70,
|
||||||
});
|
});
|
||||||
const timeoutMs = 2500;
|
await processor.initialize();
|
||||||
const withTimeout = (promise, label) =>
|
const workletNode = await processor.createAudioWorkletNode(ctx);
|
||||||
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);
|
processor.setNoiseSuppressionEnabled(true);
|
||||||
state.voice.deepFilterProcessor = processor;
|
state.voice.deepFilterProcessor = processor;
|
||||||
source.connect(workletNode);
|
source.connect(workletNode);
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ const state = {
|
||||||
muted: false,
|
muted: false,
|
||||||
sharingVideo: false,
|
sharingVideo: false,
|
||||||
sharingScreen: false,
|
sharingScreen: false,
|
||||||
noiseFilterMode: 'off',
|
noiseFilterMode: 'deepfilter',
|
||||||
activeNoiseFilter: 'off',
|
activeNoiseFilter: 'off',
|
||||||
deepFilterProcessor: null,
|
deepFilterProcessor: null,
|
||||||
deepFilterModule: null,
|
deepFilterModule: null,
|
||||||
|
|
@ -767,15 +767,8 @@ async function buildAudioPipeline(rawStream) {
|
||||||
sampleRate: 48000,
|
sampleRate: 48000,
|
||||||
noiseReductionLevel: 70,
|
noiseReductionLevel: 70,
|
||||||
});
|
});
|
||||||
const timeoutMs = 2500;
|
await processor.initialize();
|
||||||
const withTimeout = (promise, label) =>
|
const workletNode = await processor.createAudioWorkletNode(ctx);
|
||||||
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);
|
processor.setNoiseSuppressionEnabled(true);
|
||||||
state.voice.deepFilterProcessor = processor;
|
state.voice.deepFilterProcessor = processor;
|
||||||
source.connect(workletNode);
|
source.connect(workletNode);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue