Skip to content

microhone/microhone

Repository files navigation

microhone

microhone

Turn your phone into a microphone for your computer.
Over Wi-Fi or USB — into any app that reads a mic.

microhone.com · Download


Overview

Your phone already has a good microphone. microhone streams it to your computer and feeds it into a virtual audio device, so anything that can read a microphone — calls, streaming, recording — reads your phone instead.

Two apps do the work: an Android client that captures and streams the audio, and a desktop host (Rust) that decodes it, absorbs the network, and plays it into the virtual device.

The contract between them is written down once, in packages/protocol/PROTOCOL.md, and implemented twice — in Kotlin and in Rust.

Download

macOS and Linux are on the roadmap. The Windows installer is currently unsigned, so SmartScreen may warn on first run: choose More info → Run anyway.

Features

Capability Description
Wi-Fi mode Audio over UDP on the local network. The host is found automatically via mDNS.
USB mode Audio over a TCP stream tunnelled through adb, for lower latency.
Any app The audio lands in a virtual capture device, so every app on the machine sees it.
QR pairing The desktop shows a microhone://pair QR; the phone scans it to receive the key.
Encrypted audio Every frame is sealed with AES-256-GCM. Unauthenticated packets are dropped.
Opus or raw PCM Opus with packet-loss concealment on Wi-Fi; raw pcm_s16le for a lossless path.
Jitter buffer A target-latency buffer absorbs reordering and loss before playback.
Background capture An Android foreground service keeps the mic alive when the app isn't in view.
Auto-update The desktop host checks for signed updates on launch and installs in one click.

Architecture

The audio takes one path, whatever the transport:

phone: capture → encode → encrypt
                    │
                    ▼   Wi-Fi (UDP)  ·  USB (TCP over adb)
                    │
  host: decrypt → decode (+PLC) → jitter buffer → virtual audio device → any app
Piece Role
AudioEngine / AudioStreamer Captures the mic on Android and pushes frames onto the wire.
DeviceDiscovery / QrScanner Finds hosts over mDNS; reads the pairing key from the QR.
MicForegroundService Keeps capture running while the app is backgrounded.
receiver.rs Decrypts, decodes, buffers, and plays out through cpal.
setup.rs First-run install of the virtual audio device (Windows).

Wire protocol

Two channels, versioned by PROTOCOL_VERSION. Full spec in PROTOCOL.md.

Channel Wi-Fi USB Carries
Control TCP TCP over adb HELLO · PAIR_REQ · CONFIG · START / STOP
Audio UDP TCP over adb [seq][timestamp][payload] frames

Control is newline-delimited JSON. Defaults: control 47800, audio 47801, advertised as _microhone._tcp over mDNS. Audio is 48 kHz mono in 10 ms frames.

Pairing & encryption

The desktop generates a random 32-byte key and shows it as a QR / deep link:

microhone://pair?h=<host>&p=<port>&k=<base64url key>

Once paired, every audio packet on the wire becomes [ 12-byte nonce ][ AES-256-GCM ciphertext + tag ]. Frames that fail authentication are dropped, so only the paired phone is heard — and nobody else on the network can listen in.

The virtual microphone

This is the hard part of the project, and it is platform-specific.

Windows. A real device named "microhone" would need a signed kernel-mode driver (EV certificate + Microsoft attestation), so for now the host leans on VB-CABLE, a free virtual audio cable. On first run the app downloads and installs it for you — one UAC prompt, logged to %TEMP%\microhone\install.log. The device then appears as CABLE Output; select that as your microphone. Shipping a signed driver under our own name is a later, paid step.

macOS / Linux. The paths are known — an AudioServerPlugin (à la BlackHole) on macOS, a PipeWire/PulseAudio null sink on Linux. The Windows host is what is wired up today.

Latency

Use case Budget Mode
Calls, streaming, recording ~100 ms Wi-Fi is fine
Voice chat while gaming < 80 ms Wi-Fi, tuned
Monitoring yourself live < 30 ms USB

Tech stack

  • DesktopRust · Tauri 2 · React + Vite UI
  • Audio & networkcpal (I/O) · magnum-opus (codec) · aes-gcm (encryption) · mdns-sd (discovery)
  • MobileKotlin · Jetpack Compose · Android foreground service
  • SiteNext.js (microhone.com)
  • Monorepo — pnpm workspaces + Turborepo

Repo layout

microhone/
├── apps/
│   ├── site/        # Next.js — microhone.com
│   ├── desktop/     # Tauri 2 host (Rust core + React/Vite UI)
│   └── mobile/      # Android client (Kotlin + Jetpack Compose)
└── packages/
    └── protocol/    # PROTOCOL.md — the contract both sides implement

Getting started

Requires Node 20+ with pnpm (via corepack). The desktop host also needs Rust (stable) + Tauri system deps; the Android client needs Android Studio / JDK 17 + the Android SDK.

corepack pnpm install

corepack pnpm site:dev       # landing site
corepack pnpm desktop:dev    # Tauri host (needs Rust)

Open apps/mobile in Android Studio for the phone client.

About

Use your phone as a microphone for your computer over Wi-Fi or USB.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Packages

 
 
 

Contributors