Skip to content

OpenReel Video - Professional browser-based video editor. Open source CapCut alternative. 100% browser-based, no installation, no cloud uploads, no watermarks.

TypeScript

feat: add noise reduction to enhance audio workflow

Augustus Otu78ecad52d57e
diff --git a/apps/web/src/components/editor/InspectorPanel.tsx b/apps/web/src/components/editor/InspectorPanel.tsx
index c875fe8e..fd0e8708 100644
--- a/apps/web/src/components/editor/InspectorPanel.tsx
+++ b/apps/web/src/components/editor/InspectorPanel.tsx
@@ -52,6 +52,7 @@ import {
getAudioBridgeEffects,
initializeAudioBridgeEffects,
DEFAULT_EQ_BANDS,
+ DEFAULT_NOISE_REDUCTION,
} from "../../bridges/audio-bridge-effects";
import {
Input,
@@ -389,6 +390,11 @@ export const InspectorPanel: React.FC = () => {
try {
await initializeAudioBridgeEffects();
const bridge = getAudioBridgeEffects();
+ const nrResult = bridge.applyNoiseReduction(selectedClip.id, {
+ ...DEFAULT_NOISE_REDUCTION,
+ threshold: -35,
+ reduction: 0.6,
+ });
const speechEQBands = DEFAULT_EQ_BANDS.map((band, i) => {
let gain = 0;
if (i === 0) gain = -3;
@@ -405,7 +411,7 @@ export const InspectorPanel: React.FC = () => {
attack: 0.005,
release: 0.15,
});
- if (eqResult.success && compResult.success) {
+ if (nrResult.success && eqResult.success && compResult.success) {
setAudioEnhanced(true);
setTimeout(() => setAudioEnhanced(false), 2000);
}