Back to all work
— Project 05
Voice + RE

Teams Voice Bridge

Reverse-engineering Teams’ Windows-only voice onto Linux

Microsoft’s real-time Teams media stack is built for Windows: native DLLs, a .NET SDK, and no Linux runtime. Instead of adding a Windows sidecar to a Linux system, I reverse-engineered the media protocol and rebuilt the bridge in Python. The bot can join a live meeting, receive audio, and speak back from Linux.

Role
Engineer
Period
2025 to 2026
Status
Production
PythonGhidrax64dbgFridactypesICE / SRTPMS-NMF / NBFSMCP
— Chapter 01
System shape

How the system fits together.

Click a block to zoom in
Teams only supports live meeting audio on Windows — so I rebuilt the media stack on Linux. Click any block to see how.
Fig. 01 — Teams Voice Bridge architecture
— Chapter 02
Decisions and outcomes

The calls that shaped it.

  1. 01

    Stay Linux-native

    Official paths meant the .NET media SDK, a Windows sidecar, or a third-party meeting bot — so I chose the harder route: understand the Teams wire protocol well enough to implement it directly.

  2. 02

    Take Microsoft’s binaries apart

    Decompiled the native and .NET DLLs in Ghidra and ILSpy, live-debugged the Teams client with x64dbg and Frida, and read decrypted traffic in Wireshark — wiring the decompiler into an LLM over MCP to interrogate thousands of lines and get through dead ends faster.

  3. 03

    Rebuild it on Linux

    From-scratch Python implementations of Microsoft’s binary framing and SOAP-over-the-wire protocols, an ICE agent to negotiate the UDP media path, SRTP key derivation, and a fix for two hidden four-second timers that were silently killing every connection.

  4. 04

    It joins, and it talks

    The bridge joins a real meeting, plays audio people can hear, and captures returning speech byte-for-byte after decryption — and for the codec path I drove Microsoft’s native decoder from Python, validated against captured frames.

  5. 05

    Disciplined, and never blocked

    Versioned every experiment, kept real captured calls as test fixtures, and refused to ship guesses for parts I couldn’t yet name — while shipping a simpler working voice agent alongside so nothing waited on the hard path.

— Aside
The interesting work isn't the stack. It's the boundaries.
— Chapter 03
How it runs

What it runs on.

Reverse eng.
Ghidra · ILSpyx64dbg · FridaWireshark
Protocols
MS-NMFNBFSICE / STUNSDES-SRTPSATIN codec
Runtime
PythonctypesAzure ACSDeepgram · ElevenLabs