Skip to content

SHU-red/openmic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

OpenMic

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.

The Vibe-Coding Companion

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.

Prerequisites

  • Linux with PipeWire or PulseAudio
  • ffmpeg installed
  • Python 3

Installation

  1. Clone the repository:
    git clone https://github.com/shured/openmic.git
    cd openmic
  2. Make the script executable:
    chmod +x openmic.py
  3. Copy the example config to your active config directory:
    mkdir -p ~/.config/openmic
    cp config.json.example ~/.config/openmic/config.json
  4. Adjust ~/.config/openmic/config.json with your real RTSP camera URL.
  5. 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

Configuration

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"]
        }
    ]
}

How it Works

  1. Creates a module-null-sink (mixer) via PulseAudio/PipeWire APIs.
  2. Creates a module-virtual-source (the microphone device) acting as a monitor for that sink.
  3. Spawns an ffmpeg instance for each configured stream to securely and efficiently output audio into the mixer sink.
  4. If a stream drops or fails, the tool automatically tries to restart it.

License

MIT License

About

Streamline many sources into a single microphone stream

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages