node-mac-recorder 2.22.2 → 2.22.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"Bash(timeout 10 ffprobe:*)",
|
|
50
50
|
"Bash(ffmpeg:*)",
|
|
51
51
|
"Bash(timeout 30 node:*)",
|
|
52
|
-
"Bash(MAC_RECORDER_DEBUG=1 node test-camera-audio-sync.js:*)"
|
|
52
|
+
"Bash(MAC_RECORDER_DEBUG=1 node test-camera-audio-sync.js:*)",
|
|
53
|
+
"WebSearch"
|
|
53
54
|
],
|
|
54
55
|
"deny": [],
|
|
55
56
|
"ask": []
|
package/package.json
CHANGED
package/src/audio_recorder.mm
CHANGED
|
@@ -45,6 +45,22 @@ static NSString *g_lastStandaloneAudioOutputPath = nil;
|
|
|
45
45
|
return [AVCaptureDevice defaultDeviceWithMediaType:AVMediaTypeAudio];
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
- (BOOL)configureVoiceProcessingForDevice:(AVCaptureDevice *)device {
|
|
49
|
+
// NOTE: Voice Isolation (microphoneMode) is iOS-only and not available on macOS
|
|
50
|
+
// For macOS noise reduction, users should:
|
|
51
|
+
// 1. Enable "Voice Isolation" in macOS Control Center > Microphone menu (macOS 13+)
|
|
52
|
+
// 2. Or use third-party apps like Krisp, RTX Voice, or SoundSource
|
|
53
|
+
//
|
|
54
|
+
// AVCaptureDevice on macOS does not expose noise reduction or voice processing properties
|
|
55
|
+
// Alternative approaches would require:
|
|
56
|
+
// - Core Audio AUVoiceIO unit (complex, requires audio graph restructuring)
|
|
57
|
+
// - AVAudioEngine with voice processing (causes crashes on macOS with aggregate devices)
|
|
58
|
+
// - Custom DSP filtering (significant development effort, may not be effective)
|
|
59
|
+
|
|
60
|
+
MRLog(@"ℹ️ macOS microphone noise reduction: Use System Settings or Control Center to enable Voice Isolation");
|
|
61
|
+
return NO;
|
|
62
|
+
}
|
|
63
|
+
|
|
48
64
|
- (BOOL)setupWriterWithSampleBuffer:(CMSampleBufferRef)sampleBuffer error:(NSError **)error {
|
|
49
65
|
if (self.writer) {
|
|
50
66
|
return YES;
|
|
@@ -167,7 +183,10 @@ static NSString *g_lastStandaloneAudioOutputPath = nil;
|
|
|
167
183
|
}
|
|
168
184
|
return NO;
|
|
169
185
|
}
|
|
170
|
-
|
|
186
|
+
|
|
187
|
+
// Configure voice processing to filter keyboard/mouse clicks and background noise
|
|
188
|
+
[self configureVoiceProcessingForDevice:device];
|
|
189
|
+
|
|
171
190
|
self.outputPath = outputPath;
|
|
172
191
|
self.session = [[AVCaptureSession alloc] init];
|
|
173
192
|
|
|
@@ -1516,6 +1516,11 @@ static void SCKPerformRecordingSetup(NSDictionary *config, SCShareableContent *c
|
|
|
1516
1516
|
micIdToUse = nil;
|
|
1517
1517
|
}
|
|
1518
1518
|
}
|
|
1519
|
+
|
|
1520
|
+
// NOTE: Voice processing (microphoneMode) is iOS-only and not available on macOS
|
|
1521
|
+
// Voice isolation is configured in audio_recorder.mm for AVFoundation-based recordings
|
|
1522
|
+
// ScreenCaptureKit microphone capture on macOS 15+ doesn't support microphoneMode
|
|
1523
|
+
|
|
1519
1524
|
if (micIdToUse && micIdToUse.length > 0) {
|
|
1520
1525
|
streamConfig.microphoneCaptureDeviceID = micIdToUse;
|
|
1521
1526
|
}
|