--- id: soundcard version: "0.4.6" license: BSD 3-clause license_treatment: permissive maintenance: active --- # SoundCard — Play and record audio without resorting to CPython extensions License: permissive · Maintenance: active · Downloads: 126.2K/mo ## What it is and what it does SoundCard is a Python library for audio input and output that wraps the native audio APIs of Linux (PulseAudio), macOS (CoreAudio), and Windows (WASAPI) without requiring compiled C extensions. It exposes a unified interface for discovering, selecting, and controlling speakers and microphones, and handles audio data as NumPy arrays scaled to 0dBFS (Full Scale). The library supports both one-shot recording and playback as well as continuous streaming via Recorder and Player context managers. The package is designed for developers who need cross-platform audio I/O without the complexity of lower-level audio frameworks or the overhead of CPython extensions. It handles channel mapping, sample rate configuration, and latency tuning through blocksize parameters. The library is actively maintained, supports current Python versions, and carries no known security vulnerabilities, though it remains a hobby project and response times to issues may vary. Use it for: - Record audio from a microphone and play it back through speakers in real-time or batch mode. - Build a voice assistant or audio processing pipeline that captures input from a specific microphone by name. - Stream audio continuously from a multi-channel professional sound card using channel maps. - Implement low-latency audio applications by tuning blocksize and numframes parameters. - Discover and enumerate available audio devices on a user's system for dynamic device selection. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. SoundCard plays and records audio across Linux, macOS, and Windows using native OS audio libraries (PulseAudio, CoreAudio, WASAPI) without C extensions, exposing a unified Python interface for speaker and microphone access. Yes. SoundCard is a solid choice for cross-platform audio I/O in Python. It has low install friction (pure Python, two lightweight dependencies), active maintenance, permissive licensing, no known vulnerabilities, and a clear, documented API. Install it if you need speaker/microphone access without C extension overhead. Be aware that it is a hobby project—response to issues is not guaranteed to be timely—and that latency and device behavior can vary across platforms and hardware. ## Install pip install soundcard uv add soundcard poetry add soundcard ## Installing SoundCard Before you install: Low friction: pure Python wheel with only numpy and cffi as runtime dependencies. Active maintenance—last commit 2026-06-17, 124 days since latest release. Repository has 763 stars and is not archived, suggesting stable ongoing support. License in practice: BSD 3-clause is permissive; you may use, modify, and distribute this package freely in commercial and private projects, provided you include the license notice and disclaimer. Quickstart: pip install soundcard import soundcard as sc import numpy # Record one second of audio default_mic = sc.default_microphone() data = default_mic.record(samplerate=48000, numframes=48000) # Play back the recorded audio default_speaker = sc.default_speaker() default_speaker.play(data / numpy.max(numpy.abs(data)), samplerate=48000) Requires Python 3.5 or later. On Linux, PulseAudio or compatible audio system must be available; on macOS, CoreAudio; on Windows, WASAPI. Audio data must be normalized between -1 and 1 to avoid clipping. Verify before relying: - Whether latency tuning via blocksize and numframes parameters meets real-time or low-latency application requirements in practice. - Support status for less common sound cards or multi-channel professional audio interfaces beyond the documented examples. - Whether the experimental exclusive_mode flag on Windows/WASAPI is production-ready or still carries stability risks. ## Package facts - License: BSD 3-clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 126.2K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags audio playback and recording, cross-platform sound card access, microphone input capture, speaker output control, low-latency audio streaming, CFFI audio library, native audio backend wrapper, audio-io, cross-platform, real-time-audio [View on SkillFed](https://skillfed.io/packages/soundcard) · [View on PyPI](https://pypi.org/project/soundcard/)