This document explains all the methods DictaBench uses to create virtual microphones without requiring BlackHole or any external audio drivers.
DictaBench implements 2 different approaches to create virtual microphones, listed from most to least automated:
| Solution | Automation | Requirements | Reliability |
|---|---|---|---|
| 1. Auto CoreAudio | Fully Automatic | macOS only | High (95%) |
| 2. Manual Setup | Manual | macOS only | 100% |
File: coreaudio_virtual_mic.py
When you launch DictaBench, it automatically:
- Checks if "DictaBench Virtual Mic" exists
- If not, creates it using AppleScript automation
- Configures the device silently in the background
- Notifies you when ready
from coreaudio_virtual_mic import CoreAudioVirtualMic
# Create instance
vm = CoreAudioVirtualMic()
# Automatic setup
success = vm.setup() # Returns True if successful
# Check if exists
if vm.device_exists():
print("Virtual mic ready!")Device Name: DictaBench Virtual Mic
Type: Aggregate Device
Components:
- Built-in Output (receives audio from DictaBench)
- Built-in Input (optional, for monitoring)
Launch DictaBench
↓
Status: "Creating virtual microphone..."
↓
[10 seconds later]
↓
Status: "✓ Virtual microphone ready!"
↓
Device available immediately
✅ Zero user interaction ✅ No external software needed ✅ Works on fresh macOS install ✅ Automatic on first launch ✅ Self-healing (recreates if deleted)
Complete manual instructions for creating devices yourself in Audio MIDI Setup.
- Open Audio MIDI Setup (Applications > Utilities)
- Click + in the bottom-left corner, select Create Multi-Output Device
- Name it "DictaBench Output"
- Check Built-in Output
- Click + again, select Create Aggregate Device
- Name it "DictaBench Virtual Mic"
- Check your Multi-Output Device and Built-in Microphone
- Enable Drift Correction for the Multi-Output Device
- Go to System Settings > Sound > Output and select "DictaBench Output"
- In your voice dictation app, select "DictaBench Virtual Mic" as the microphone
- Automatic setup fails
- You need custom configuration
- You're troubleshooting issues
- You want full control
All three solutions create the same audio routing:
DictaBench Audio
↓
System Output Device
↓
Multi-Output Device (DictaBench Output)
↓
Aggregate Device (DictaBench Virtual Mic)
↓
Voice Dictation App Captures Audio
Solution 1 uses:
# AppleScript automation via subprocess
subprocess.run(['osascript', '-e', script])
# Creates aggregate device using UI automation
# More reliable than direct CoreAudio API callsWhy not direct CoreAudio API?
- Python CoreAudio bindings are incomplete
AudioHardwareCreateAggregateDevice()requires complex setup- UI automation is more maintainable
- Works across macOS versions
coreaudio_virtual_mic.py
├── CoreAudioVirtualMic class
│ ├── get_builtin_device_uids()
│ ├── create_aggregate_device_applescript()
│ ├── device_exists()
│ ├── setup()
│ └── cleanup()
└── Integration with key_presser_gui.py
| Feature | DictaBench Solution | BlackHole |
|---|---|---|
| External Software | None needed ✓ | Required |
| Installation | Automatic ✓ | Manual brew install |
| System Permissions | Accessibility only | Kernel extension |
| Compatibility | All voice apps ✓ | Varies by app |
| Removal | Delete in Audio MIDI | Uninstall package |
| Updates | None needed ✓ | Periodic |
| Privacy | No data collection ✓ | Open source |
Consider BlackHole if:
- You need advanced audio routing
- You use multiple audio applications
- You're familiar with virtual audio drivers
- You want community support
- You need ultra-low latency
Use DictaBench's built-in solution if:
- You want zero external dependencies ✓
- You prefer automatic setup ✓
- You only need basic virtual mic ✓
- You don't want to install drivers ✓
Symptoms: "Virtual mic setup pending" message
Solutions:
-
Grant accessibility permissions:
- System Preferences > Security & Privacy > Accessibility
- Add Terminal or Python to allowed apps
-
Check Audio MIDI Setup is accessible:
open -a "Audio MIDI Setup"
Symptoms: Setup reports success, but device not in list
Solutions:
- Restart DictaBench
- Check in Audio MIDI Setup (should see the device)
- Run device detection:
python3 -c "import sounddevice as sd; [print(d['name']) for d in sd.query_devices()]"
Symptoms: Aggregate device exists but voice app doesn't list it
Solutions:
- Restart the voice dictation app
- Check it's configured as Input device (not Output)
- Grant microphone permissions to the app
- Verify Aggregate Device includes both sub-devices
Symptoms: Device selected but captures silence
Solutions:
-
Set system output to "DictaBench Output": System Preferences > Sound > Output
-
Check Aggregate Device configuration:
- Open Audio MIDI Setup
- Select "DictaBench Virtual Mic"
- Verify "DictaBench Output" is checked
- Enable "Drift Correction" for DictaBench Output
-
Test with QuickTime:
- Open QuickTime Player
- File > New Audio Recording
- Select "DictaBench Virtual Mic"
- Play audio in DictaBench
- Should see levels move
Edit coreaudio_virtual_mic.py:
self.aggregate_device_name = "My Custom Mic Name"In Audio MIDI Setup:
- Select "DictaBench Virtual Mic"
- Check additional audio devices
- They'll all mix into the virtual mic
Create a second Multi-Output for personal monitoring:
- Multi-Output Device: Your Headphones + DictaBench Output
- Hear audio while it routes to virtual mic
class CoreAudioVirtualMic:
def __init__(self):
"""Initialize virtual mic creator."""
def device_exists(self) -> bool:
"""Check if aggregate device exists."""
def setup(self) -> bool:
"""Create virtual microphone. Returns True if successful."""
def cleanup(self) -> bool:
"""Remove virtual microphone device."""
def get_builtin_device_uids(self) -> tuple:
"""Get UIDs of built-in audio devices."""from coreaudio_virtual_mic import CoreAudioVirtualMic
# Create and setup
vm = CoreAudioVirtualMic()
if not vm.device_exists():
print("Creating virtual microphone...")
if vm.setup():
print("✓ Ready!")
else:
print("✗ Failed")
# Later, cleanup
vm.cleanup()- Loopback by Rogue Amoeba: $99, GUI-based, very powerful
- BlackHole: Free, open-source, requires installation
- SoundFlower: Legacy, no longer maintained
- sounddevice: For device enumeration and audio I/O
- PyObjC: For CoreAudio API access (optional)
- pyaudio: Alternative to sounddevice
Want to improve DictaBench's virtual mic solutions?
Areas for contribution:
- Linux/Windows virtual mic support
- Direct CoreAudio API implementation
- Better error handling
- Cross-platform audio routing
See the main README.md for contribution guidelines.
DictaBench provides two complementary solutions for virtual microphones:
- Automatic (
coreaudio_virtual_mic.py): Works out of the box for 95% of users - Manual (see Solution 2 above): Complete control if needed
Both solutions require NO external software (no BlackHole), use only macOS built-in features, and work with all voice dictation apps.