A minimalistic, highly resource-efficient virtual microphone application for Linux. Mix arbitrary audio sources (like RTSP streams from IP cameras) into a single virtual microphone.
Designed for a Speech-Input Agnostic workflow. If you use persistent audio sources (like a room camera) for coding by voice, OpenMic provides a stable, always-on system microphone without the overhead of heavy streaming software.
- Linux with PipeWire or PulseAudio
ffmpeginstalled- Python 3
- Clone the repository:
git clone https://github.com/shured/openmic.git cd openmic - Make the script executable:
chmod +x openmic.py
- Copy the example config to your active config directory:
mkdir -p ~/.config/openmic cp config.json.example ~/.config/openmic/config.json
- Adjust
~/.config/openmic/config.jsonwith your real RTSP camera URL. - Auto-start on boot using systemd:
# Copy service file mkdir -p ~/.config/systemd/user/ cp openmic.service ~/.config/systemd/user/ # Enable and start systemctl --user enable --now openmic.service
See ~/.config/openmic/config.json.
You can adjust:
virtual_mic_name: The name of the virtual microphone that will show up in your settings and chat applications.sources: A list of streams. Add as many as you need to mix them together.
{
"virtual_mic_name": "OpenMic",
"sources": [
{
"name": "ipcam",
"url": "rtsp://admin:[email protected]:554/live/ch0",
"options": ["-rtsp_transport", "tcp"]
}
]
}- Creates a
module-null-sink(mixer) via PulseAudio/PipeWire APIs. - Creates a
module-virtual-source(the microphone device) acting as a monitor for that sink. - Spawns an
ffmpeginstance for each configured stream to securely and efficiently output audio into the mixer sink. - If a stream drops or fails, the tool automatically tries to restart it.
MIT License