What Started as a Simple Test
I hit Ctrl+Alt+J to test my voice dictation setup. Said a few sentences. Got back half a sentence.
“That’s weird,” I thought. Tried again. Same thing: perfect recording for about 2.5 seconds, then… nothing. The recording kept going but the microphone just stopped picking up my voice.
Built-in mic? Worked perfectly. AirPods Pro? Consistently cut off after the first sentence.
Time to figure out what was going on.
The Pattern Emerges
What I Was Seeing
Testing the PAI dictation system with my usual Ctrl+Alt+J hotkey:
- AirPods Pro: Only captured the first sentence, every single time
- Built-in mic: Captured everything perfectly, no matter how long I talked
- The cutoff: Always happened around 2.5 seconds
The First Clue
Here’s what I actually said versus what got transcribed:
What I said: “We’ve turned on the microphone and want to see if this captures the full message including all the details about the testing process”
What got transcribed: “We’ve turned on the microphone and want to see”
That’s not a transcription error. That’s the audio just… stopping.
Down the Debugging Rabbit Hole
First Things First: Check the Obvious Stuff
When hardware acts weird, start with the basics. Maybe something was misconfigured?
|
|
Everything looked perfect. PipeWire running (not PulseAudio, thank god), proper Bluetooth profiles, AirPods connected and recognized.
So it wasn’t a Linux configuration issue. The problem was somewhere else.
Looking at the Actual Audio
After testing different recorders and getting the same result, I decided to actually examine the audio file. Sometimes the simplest approach works best.
|
|
The output told the whole story:
- 0-1.17s: Initial silence (normal)
- 1.17-3.75s: My voice, crystal clear (exactly 2.5 seconds)
- 3.75-10s: Dead silence
Not just quiet. Dead silence. The microphone didn’t just get quieter. It completely shut off at exactly 2.5 seconds.
That’s when I knew this wasn’t a Linux problem. This was firmware being “helpful.”
The “Aha” Moment
A quick search confirmed my suspicion. Turns out this is a “feature.”
“AirPods Pro firmware detects any background noise or wind noise and immediately lowers the sensitivity of the microphone in response until the external noise stops. This results in the AirPods Pro microphone turning off, on, off, on, cutting off the voice.”
Apple’s firmware is constantly listening for background noise. Hear anything it doesn’t like? Boom: microphone sensitivity drops to zero. The AirPods are trying to give you crystal clear audio by shutting off the microphone whenever they detect… well, life.
This isn’t just a Linux thing. MacBooks, iPhones, everything. The firmware doesn’t care what OS you’re running. It’s going to “help” whether you want it or not.
Of course it’s the firmware.
What Actually Works
Just Use the Built-in Mic (Seriously)
I spent an hour trying to outsmart Apple’s firmware. You know what worked immediately? Disconnecting the AirPods and using the laptop’s built-in microphone.
|
|
Tested it on a windy balcony with urban noise. Perfect capture every time. Sometimes the simple solution is the right solution.
The “I’m Not Giving Up” Solutions
If you really want to keep using AirPods (I get it, they’re convenient), here’s what I tried:
Smart Detection Script
Built a script that automatically switches between AirPods and built-in mic:
|
|
The “Speak in Chunks” Technique
- Say 2-3 words at a time
- Brief pause between chunks
- Lets the firmware reset its noise gate
- Feels weird but technically works
Different Hardware
- Wired headphones with microphone (no firmware shenanigans)
- Different Bluetooth headsets that aren’t quite so “smart”
- USB microphones (if you want that podcast setup)
Why None of My Clever Ideas Worked
PipeWire Was Never the Problem
I initially thought this was a Linux audio issue. PipeWire is supposed to be way better than PulseAudio for Bluetooth, right?
Turns out, PipeWire was doing everything perfectly. The audio was getting to Linux just fine. The problem was happening inside the AirPods before Linux even got a chance to mess it up.
That’s the thing about firmware issues: you can have the perfect software stack and it doesn’t matter if the hardware decides to be clever.
Bluetooth Profiles: Also Not the Issue
- A2DP: Great for listening to music, but no microphone
- HSP/HFP: The profile you need for microphone input
- mSBC vs CVSD codecs: Different quality levels, same firmware limitation
I tested every profile and codec combination. The cutoff happened regardless. It’s not about how the audio gets transmitted. It’s about whether the microphone stays on long enough to transmit anything.
What I Learned (Besides “Firmware Wins”)
Sometimes You Debug the Wrong Thing
I spent 30 minutes convinced this was a PipeWire configuration issue. Checked profiles, tested codecs, analyzed Bluetooth settings. All perfectly configured.
The real issue was happening before any of that mattered. The microphone was shutting off inside the AirPods themselves.
Lesson: When something works perfectly with one device and fails consistently with another, the problem is probably the device, not your configuration.
You Can’t Fix Hardware with Software
This was a good reminder that not every problem has a clever software solution. Sometimes Apple’s firmware engineers make decisions that you just have to live with.
No amount of shell scripting is going to convince AirPods Pro to stop being “helpful” with their noise detection.
The Simple Solution is Often the Right Solution
After building three different recording tools and testing every codec, the solution was… using the built-in microphone.
Sometimes you just overcomplicate things.
Real-World Testing Results
Recording Performance
Device | Duration | Captured Audio | Success Rate |
---|---|---|---|
AirPods Pro | 10s | 2.5s | 25% |
Built-in Mic | 10s | 10s | 100% |
AirPods (chunked) | 10s | ~2.5s | 5% |
Built-in Microphone Validation
Conducted comprehensive testing of the built-in microphone solution:
Test Environment: Noisy, windy balcony in urban environment
Results:
- ✅ Full message capture: No truncation, complete dictation recorded
- ✅ Environmental resilience: Worked correctly despite outdoor noise and wind
- ⚠️ Minor transcription errors: Some spelling/hearing issues but “no worse than me typing”
- ✅ Practical usability: “working ok with the onboard mic”
Key Finding: Built-in microphone demonstrates superior reliability compared to AirPods Pro, even in challenging acoustic environments where the AirPods firmware would typically trigger aggressive noise cancellation.
The Dream: ArchLinux + AirPods Pro + Claude Code Dictation 🎯
Why I’m Not Giving Up
Look, I know the built-in mic works great. But there’s something appealing about the idea of truly wireless dictation: being able to walk around, step outside, dictate while doing other things.
Potential Research Directions
- Custom Bluetooth Drivers: Modify HFP implementation to bypass noise gate
- Firmware Reverse Engineering: Understanding Apple’s noise detection algorithms
- Hardware Alternatives: Test other premium Bluetooth headsets without aggressive noise gating
- Audio Pipeline Innovation: Novel approaches to continuous audio capture
- Apple Firmware Updates: Monitor for official fixes to microphone cutoff issue
Why This Matters
- Workflow Optimization: AirPods Pro offer superior convenience for mobile dictation
- Professional Integration: Seamless transition between audio consumption and voice input
- Technical Achievement: Solving this would benefit the entire Linux + AirPods community
- PAI Enhancement: Truly wireless dictation would enhance the Personal AI Infrastructure
This represents a worthy engineering challenge that combines hardware integration, audio processing, firmware behavior analysis, and user experience optimization: exactly the type of problem that drives innovation.
Current Production Setup
Recommendation: Use built-in microphone for PAI dictation
- Proven reliable across all test scenarios
- Full message capture regardless of length
- Environmental resilience (tested outdoors with wind/noise)
- Consistent activation without connection issues
For now, the PAI dictation system uses:
- Primary: Built-in microphone for reliability (validated in multiple environments)
- Fallback: Adaptive script detecting Bluetooth devices
- Future: Advanced solutions and alternative Bluetooth headsets
Next Steps
- Monitor Apple firmware updates for microphone improvements
- Test alternative premium Bluetooth headsets (Sony, Bose, etc.)
- Research custom Bluetooth driver development
- Engage with Linux audio community for collaborative solutions
- Document findings for broader community benefit
- Continue using built-in microphone as reliable production solution
References
- PipeWire Bluetooth Documentation
- Apple AirPods Pro Microphone Issues
- whisper.cpp Audio Input Requirements
- PAI Dictation System:
~/.claude/tools/simple-dictate.sh