feat(source): add a source@v1 capture client (sendspin source) - #270
Draft
rudyberends wants to merge 1 commit into
Draft
feat(source): add a source@v1 capture client (sendspin source)#270rudyberends wants to merge 1 commit into
rudyberends wants to merge 1 commit into
Conversation
Add a 'sendspin source' command that runs a source client: capture audio from a local input (line-in/microphone) or a sine test tone, encode it (PCM, FLAC, or Opus via PyAV), and stream it to a server, which mixes and distributes it to players. The server controls when the source streams. - source_utils: PyAV SourceEncoder (exposes raw codec header) + RMS level - source_stream: SourceStreamer capture loop (sounddevice / sine), server start/stop handling, optional line-sense signal reporting - cli: 'source' subcommand and 'audio-devices inputs' listing - audio_devices: input-device enumeration - settings: SourceSettings persistence (settings-source.json) - README: source mode documentation
This was referenced Jul 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
sendspin sourcecommand: run as a Sendspin source client that captures audio from a local input (line-in/microphone) or a synthetic sine test tone, encodes it (PCM, FLAC, or Opus via PyAV), and streams it to a server, which mixes and distributes it to players.Implements the client side of the
source@v1role (Sendspin/spec#105).Depends on Sendspin/aiosendspin#286 (the
source@v1protocol + client SDK). Theaiosendspinversion pin here must be bumped to the release that includes it before this can merge — hence draft.Supersedes #123, which targeted the earlier
input_stream/*proposal.What's added
source_utils.py:SourceEncoder(PyAV; PCM passthrough / FLAC / Opus, exposing the raw codec header) + an RMS level metersource_stream.py:SourceStreamer— capture loop (sounddeviceline-in or sine tone), server-driven start/stop, optional line-sense reporting; stamps each frame with its capture timecli.py:sendspin sourcesubcommand andsendspin audio-devices inputslistingaudio_devices.py: input-device enumerationsettings.py:SourceSettingspersistence (settings-source.json)README.md: source-mode documentationCapture is 16-bit; the server handles decode/resample/mix. The server is the sole initiator of streaming (a source stays idle until told to start). A device may run both
sourceandplayer; it never plays its captured input locally.Testing
ruff+mypyclean;pytest: 155 passed (13 new, incl. a cross-repo round-trip: encode with the CLI encoder then decode with the aiosendspin server decoder, for PCM/FLAC/Opus).