Skip to content

docs: publish desktop audio with PocketStation - #805

Open
Raphjacksun7 wants to merge 1 commit into
livekit:mainfrom
Raphjacksun7:feat/desktop-audio
Open

docs: publish desktop audio with PocketStation#805
Raphjacksun7 wants to merge 1 commit into
livekit:mainfrom
Raphjacksun7:feat/desktop-audio

Conversation

@Raphjacksun7

Copy link
Copy Markdown

Summary

Add a runnable Python example that publishes one local audio source to a LiveKit room:

  • a selected desktop application;
  • the complete desktop output mix; or
  • an explicitly selected microphone.

PocketStation owns local capture and delivers source-aware frames outside the operating-system callback. The example downmixes those frames to mono PCM16 and publishes them through LiveKit AudioSource. Application and system audio are marked as screen-share audio; microphone capture is never enabled automatically.

The example uses released packages only: pocketstation==0.1.4, livekit==1.1.17, and livekit-api==1.2.1.

Verification

Commit: 6632785e1c195ebb5879e2cc97171f5bfeed9238

uvx ruff check examples/desktop_audio/publish.py examples/desktop_audio/tests/test_publish.py
uvx ruff format --check examples/desktop_audio/publish.py examples/desktop_audio/tests/test_publish.py
python -m unittest discover examples/desktop_audio/tests -v
mypy --strict examples/desktop_audio/publish.py

A clean Python 3.11 environment installed all three packages from PyPI and passed the conversion test.

I also ran a local LiveKit 1.13.3 server with separate publisher and receiver participants on macOS:

  • selected QuickTime Player: 1,126 PocketStation frames submitted; receiver observed 643 frames, 308,640 samples, 30,670 nonzero samples, peak 32,767;
  • system audio: 1,126 PocketStation frames submitted; receiver observed 627 frames, 300,960 samples, 72,659 nonzero samples, peak 32,768.

This proves native macOS capture and same-host LiveKit delivery. It does not qualify WAN/TURN behavior. The microphone option was not opened during this run; the README directs interactive voice applications to LiveKit PlatformAudio for AEC, noise suppression, and gain control.

@CLAassistant

CLAassistant commented Sep 4, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

devin-ai-integration[bot]

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants