feat: RNNoise WASM AudioWorklet for ML-based noise suppression (Phase 3)
Inject @sapphi-red/web-noise-suppressor into AudioManager's input pipeline as a toggleable AudioWorkletNode. The worklet is loaded lazily on first enable, then kept alive — toggling bypasses by rewiring the graph without destroying the WASM instance. Browser NS is forced off when RNNoise is active to avoid double-processing. InputGain forced to stereo up-mix to prevent mono-left-only output from the worklet. Also wires Phase 2 output device routing (setSinkId) into AppLayout/ChannelSidebar.
This commit is contained in:
@@ -69,6 +69,14 @@ export function AppLayout() {
|
||||
return () => observer.disconnect();
|
||||
}, []);
|
||||
|
||||
// Sync persisted output device preference to AudioManager.
|
||||
// AudioManager defers setSinkId until the AudioContext is actually created,
|
||||
// so this is safe to call before any user interaction.
|
||||
const outputDeviceId = useVoiceStore((s) => s.outputDeviceId);
|
||||
useEffect(() => {
|
||||
AudioManager.getInstance().setOutputDevice(outputDeviceId);
|
||||
}, [outputDeviceId]);
|
||||
|
||||
const { user, isLoading } = useAuth();
|
||||
const setCurrentServer = useServerStore((s) => s.setCurrentServer);
|
||||
const loadServerDetail = useServerStore((s) => s.loadServerDetail);
|
||||
|
||||
Reference in New Issue
Block a user