This release is a pre-release and may not be stable for production use.
tachyaudio
tachyaudio is a low-level audio package intended to replace tachypy’s direct
dependency on sounddevice/PortAudio over time.
Status: beta. Ordinary streams use Core Audio on macOS, vendored miniaudio
on Linux (PulseAudio/PipeWire first, ALSA as fallback) and vendored miniaudio
with WASAPI on Windows. Experimental device-clock scheduling
(ScheduledOutputStream) is available on macOS (Core Audio) and Linux (direct
ALSA); not yet on Windows. See Linux: which audio path is used.
Goals
- install from
pipwithout requiring users to install PortAudio separately - keep real-time audio work out of Python callbacks where possible
- expose explicit latency, underrun, and overrun diagnostics
- support playback, capture, duplex streams, and device enumeration
- keep tachypy’s public API stable while the backend evolves
Non-goals
- full DAW-style audio graph support in the initial release
- replacing OS audio stacks such as Core Audio, WASAPI, ALSA, or PulseAudio
- exposing backend-specific details as the primary user API
Initial API shape
import tachyaudio as ta
devices = ta.list_devices()
stream = ta.OutputStream(sample_rate=48_000, channels=2)
stream.write(samples)
with stream:
...
stats = ta.play(samples, sample_rate=48_000, channels=2)
The native backend currently supports device enumeration, float32 output playback, and nonblocking float32 input capture on macOS, Linux, and Windows.
OutputStream is currently a continuous stream. Write audio before or during
playback; if the stream runs out of queued frames it outputs silence and counts
an underrun.
Use tachyaudio.play() for finite stimuli that should start, drain, and close
as a single operation.
See examples/play_wav.py for dependency-free playback of WAV files exported
from an editor such as Audacity. The repository example uses a 48 kHz float WAV
to avoid runtime resampling. Pass --eq to show a lightweight five-band
terminal meter during playback.
Use blocking helpers when callers need complete buffer transfer:
OutputStream.write_all(frames, timeout=None): wait until all frames are accepted by the output ringInputStream.read_exactly(frame_count, timeout=None): wait until exactly the requested number of frames has been captured
Full-duplex capture/playback is exposed as DuplexStream. Native macOS, Linux,
and Windows support is available.
Lifecycle semantics:
stop(): stop playback without discarding queued framesdrain(): wait for queued frames to playflush(): discard queued frames without closing the streamclose(): stop playback and release native resources
StreamStats reports:
frames_processed: frames consumed by the backendunderruns/overruns: buffer starvation or rejected writeshardware_latency: backend-reported device latency in seconds when availablequeued_frames: frames currently waiting in the native ringqueued_latency: queued ring duration in secondsestimated_latency:queued_latency + hardware_latencywhen hardware latency is available, otherwise queued latencybuffer_size: native callback buffer size in frames
Linux: which audio path is used
Linux has two independent paths; the class you use (in tachypy,
Audio(timing_mode=...)) decides which one plays your sound.
| Ordinary streams | Scheduled output | |
|---|---|---|
| API | OutputStream, InputStream, DuplexStream, play(); tachypy timing_mode="software" (default) |
ScheduledOutputStream; tachypy timing_mode="native" |
| Route | miniaudio → PulseAudio/PipeWire (ALSA if no sound server) |
ALSA directly, bypassing PulseAudio/PipeWire |
| Device ids | list_devices(), e.g. output-alsa_output.usb-...analog-stereo |
hw:CARD=PCH,DEV=0; run python3 -c "import tachyaudio; tachyaudio.ScheduledOutputStream()" to list them |
| Sharing | mixed with other applications | exclusive: the device must be free |
| Onset | a Python thread wakes at when, then the server buffers |
a native real-time thread places the first sample on the device clock |
| Measured jitter ¹ | 3.4 ms std | about 70 µs std |
¹ Acoustic loopback through one USB wireless headset, which contributes part of the native figure; not a comparison with PsychPortAudio.
For timing-critical stimuli use scheduled output, ideally with a wired interface. Its setup, parameters (automatic by default), troubleshooting and validation are in docs/linux-scheduling.md.
Development
Supported Python versions:
- Python 3.10
- Python 3.11
- Python 3.12
- Python 3.13
- Python 3.14
Run the standard-library test suite:
python3 -m unittest discover -s tests
Play a short test tone:
PYTHONPATH=src python3 examples/play_tone.py
Capture a short input buffer and print its RMS level:
PYTHONPATH=src python3 examples/capture_level.py
InputStream.read(frame_count) is nonblocking and returns currently available
frames up to frame_count.
On macOS, a restricted sandbox may hide Core Audio devices. On Linux, sandboxed
processes may be unable to reach the user PipeWire/PulseAudio server. On
Windows, remote/headless sessions may expose different WASAPI endpoints than an
interactive desktop login. If tachyaudio.list_devices() returns an empty tuple
or unexpected devices in a sandboxed environment, verify from an unsandboxed
terminal before debugging the backend. Headless Linux containers may return no
devices while still being able to build and import the native extension.
Metadata
Release files for tachyaudio 0.2.0b3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| tachyaudio-0.2.0b3.tar.gz | 746.2 kB | Without provenance | Details for tachyaudio-0.2.0b3.tar.gz |
Built distributions (wheels)
Total release size: 19.3 MB
Release files / tachyaudio-0.2.0b3.tar.gz
| Download URL | tachyaudio-0.2.0b3.tar.gz |
|---|---|
| Size | 746.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
62f0782400a9fa4d0bcea83981b4d862d9f14139dea2c5eb0659d3e6dda19067
|
|
BLAKE2b-256 checksum How to use checksums |
59a248cc0d28a2ff09a76273126aaaa40d7729c6a399ae7897c7d87fcb0ab135
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp314-cp314-win_amd64.whl
| Download URL | tachyaudio-0.2.0b3-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 796.7 kB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
ffa4c7f2737720d35c0685bd06156f7fce80f1122aeb74ef8d11438237a3603b
|
|
BLAKE2b-256 checksum How to use checksums |
0eeed48b0a2d6f5ac1389f172ecdaa32793d3ecab3fc0b76496e4ce979c7357f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | tachyaudio-0.2.0b3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
90805a3b0540b8504e31c86e901c3771edde72f01e9577a8655efa225634dc64
|
|
BLAKE2b-256 checksum How to use checksums |
0d26bfe866007c792d04b6fa07cc996da9c5378a5772168287dd404f0496974c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | tachyaudio-0.2.0b3-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 731.5 kB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
33cb3cd53182c14814a9051c90109c6562266d728eb22dc49effdb77b2fbfb82
|
|
BLAKE2b-256 checksum How to use checksums |
1312bf047f72d39eac48d250b573581974502862bed2e1192d1e486387abc1c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp314-cp314-macosx_10_15_x86_64.whl
| Download URL | tachyaudio-0.2.0b3-cp314-cp314-macosx_10_15_x86_64.whl |
|---|---|
| Size | 732.0 kB |
| Tags | CPython 3.14 macOS 10.15+ x86-64 |
|
SHA-256 checksum How to use checksums |
f9f6742dd8b22d25019158894f6ae3fb6bebbb5425ab6b0f08e20ead6aefd2c5
|
|
BLAKE2b-256 checksum How to use checksums |
31dc714b13ab2693895c2293b65cae15344e2fadeff29736d2d0b6d0529e5648
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp313-cp313-win_amd64.whl
| Download URL | tachyaudio-0.2.0b3-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 797.4 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d6e25badc0892a138af763bdcc0cefd596d049fc585f6d3cda62b8ca5dc13926
|
|
BLAKE2b-256 checksum How to use checksums |
8338877bd6f90016c097f9f286ab2bfdd507942f3f173e3bafe5da87225fe53f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | tachyaudio-0.2.0b3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
fd0ca63f5291d3d3be19da14b0eec76162bd990c0baaab1541dfce8f72592cda
|
|
BLAKE2b-256 checksum How to use checksums |
3b9e2a7b93aa3c619354cf8a1f43ff70ba83b7a5363f7f515e8afee065fed40e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | tachyaudio-0.2.0b3-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 731.6 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
099bb3d36e2dc87cb55b6ab110b40acdd337297fd4c94a37395d86438ee6d124
|
|
BLAKE2b-256 checksum How to use checksums |
7ec814df62fe91887c95680454b7b901af76d0ae08496f0f182db8b6df212853
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp313-cp313-macosx_10_13_x86_64.whl
| Download URL | tachyaudio-0.2.0b3-cp313-cp313-macosx_10_13_x86_64.whl |
|---|---|
| Size | 732.0 kB |
| Tags | CPython 3.13 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
c71d84bdd2aa52f7d8f8a530f1ca44e8e20a69b7d92a419a2d3e1e08223e1e5d
|
|
BLAKE2b-256 checksum How to use checksums |
554479dbe293b0587578cf21ebe473543821849aec5abd002786044687931607
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp312-cp312-win_amd64.whl
| Download URL | tachyaudio-0.2.0b3-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 797.4 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
f6fcf26bb4168824d405019e14d6c53033f5daf05486a59cb1f6a0496cac7486
|
|
BLAKE2b-256 checksum How to use checksums |
234eeaabcc77862b1a0ca0234e182514e3adc1ebe9da6c3bc5563a99b2fb619f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | tachyaudio-0.2.0b3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
c71009404834effc0572f65ec5699cba9e28739259826031e6b8eb1c27db609c
|
|
BLAKE2b-256 checksum How to use checksums |
dad99b3053b1a8f0425ef3c13d4cb679a61bbaf20267d45d830851528666d2aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | tachyaudio-0.2.0b3-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 731.6 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
147960cb6512dc5d05a3c4e8adde8bf8f304f845a600eda5c58428de97ee7845
|
|
BLAKE2b-256 checksum How to use checksums |
0b3f983f9e2c7101eac80b93156692be523867c70e15edcd3750118c79dfc85c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp312-cp312-macosx_10_13_x86_64.whl
| Download URL | tachyaudio-0.2.0b3-cp312-cp312-macosx_10_13_x86_64.whl |
|---|---|
| Size | 732.0 kB |
| Tags | CPython 3.12 macOS 10.13+ x86-64 |
|
SHA-256 checksum How to use checksums |
9df81fcb889e910f1ccd28b9a9a4a77c3fda56efb541f675b9921c869ba56cb5
|
|
BLAKE2b-256 checksum How to use checksums |
ae78d4f91bff4ce42c0ed37f4b1fe364dd86de65c4f5a464dbe21df434335a7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp311-cp311-win_amd64.whl
| Download URL | tachyaudio-0.2.0b3-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 797.4 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
b6e932fae7615681f05c358d4fa10f0d1fe87506af0a8bc8f6cc5bbc1499d8a2
|
|
BLAKE2b-256 checksum How to use checksums |
bf475b863a9359475ab14907abe9b82a32b306d4f75cb933195d2a4df43cdcb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | tachyaudio-0.2.0b3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
5bda9f9ccbf6a4aab3aeb9b16ec230b034d63a35fd96fa856cf1e5445ac06e2a
|
|
BLAKE2b-256 checksum How to use checksums |
18d8074f3c9c12faa88c2e7d23c5e00b5564ec1ddb11b7798c420eb26b3d1552
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | tachyaudio-0.2.0b3-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 731.4 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
922013d06d687d5906652e03eeb07b0c34925996f375d3123d145e4ae46eb15f
|
|
BLAKE2b-256 checksum How to use checksums |
ec4765fed75bdfae5a2cfe57207bfe6dc7ce907d4bc50ba5d060cf85fbec0f9c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp311-cp311-macosx_10_9_x86_64.whl
| Download URL | tachyaudio-0.2.0b3-cp311-cp311-macosx_10_9_x86_64.whl |
|---|---|
| Size | 731.7 kB |
| Tags | CPython 3.11 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
10a295505db3572e3744784e944c16fbb4b977c63f5164e84bf2325d50e016ee
|
|
BLAKE2b-256 checksum How to use checksums |
d9601d58563dbd01359d68b60f192e5fe530a5c35d73c1ce250f9b08127a27dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp310-cp310-win_amd64.whl
| Download URL | tachyaudio-0.2.0b3-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 797.4 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
04fab9510e5bbfa73944729254095d8358b69a6ec22281979a09f9b9de8625b0
|
|
BLAKE2b-256 checksum How to use checksums |
41dec3d75bf72d0991c49fdff8bfbba9b8d67d94fd63d8072961b5b8fe751a7a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | tachyaudio-0.2.0b3-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d18dac75ecae87f7fc10f8c2c71b9499074c4ccf18c06796a3ca7646ca3e9d6d
|
|
BLAKE2b-256 checksum How to use checksums |
6d7bb09ac8bac34e28b1ec651cc48029faf09cafbd8e42d8edc895958eb5511b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | tachyaudio-0.2.0b3-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 731.4 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
2f16bc7896237752c86bb6437010e3665da750f6190d193def3c2e1ca93fd508
|
|
BLAKE2b-256 checksum How to use checksums |
f9d4b79ffe9951f09db4f2cf384b5250d2eec6cf5e2961fe34abd8bca3943370
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / tachyaudio-0.2.0b3-cp310-cp310-macosx_10_9_x86_64.whl
| Download URL | tachyaudio-0.2.0b3-cp310-cp310-macosx_10_9_x86_64.whl |
|---|---|
| Size | 731.7 kB |
| Tags | CPython 3.10 macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
0cba9759b2d3838420c9a1ce77b1e85e9a42d3a0b9c37bc1001102810f010ddd
|
|
BLAKE2b-256 checksum How to use checksums |
99d80f370689965b0403a61fd256fa2e7c994914b41639c137dca54ea16b97b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Security for tachyaudio 0.2.0b3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.