roboflex.audio_sdl
Support for reading audio data using Simple Directmedia Layer.
System dependencies
Requires python development libraries, and numpy. To compile the c++, we suggest a virtual python environment with numpy installed.
Requires SDL to be installed. More than likely, it already is installed in your distro. But if not:
apt-get install libsdl2-dev
# or maybe on mac:
brew install sdl2
pip install
pip install roboflex.audio_sdl
Import
import roboflex.audio_sdl as ras
Nodes
There is only one: AudioSensor
# all parameters optional: below are the defaults
audio_sensor = ras.AudioSensor(
capture_id = -1,
channels = 1,
sampling_rate = 48000,
capture_samples = 512,
format = ras.BitDepth.F32,
name = "AudioSensor",
data_key = "data",
debug = False,
)
# must be started (like all sensors)!
audio_sensor.start()
# you can get the realized channels and sampling rate (might be different from what you requested):
audio_sensor.sample_rate
audio_sensor.channels
# you can print the available detected devices, through a static method
ras.AudioSensor.show_devices()
This sensor publishes a TensorMessage, with the audio data encoded into a tensor of shape (C, S), where C is num channels, and S is capture_samples, under the key <data_key>.
Other
Available BitDepths:
# wrapped from SDL_AudioFormat: https://wiki.libsdl.org/SDL2/SDL_AudioFormat
enum ras.BitDepth:
S8,
U8,
S16LSB,
S16MSB,
S16SYS,
S16,
U16LSB,
U16MSB,
U16SYS,
U16,
S32LSB,
S32MSB,
S32SYS,
S32,
F32LSB,
F32MSB,
F32SYS,
F32
Metadata
Release files for roboflex.audio-sdl 0.1.10
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 |
|---|---|---|---|---|
| roboflex_audio_sdl-0.1.10.tar.gz | 9.8 kB | Without provenance | Details for roboflex_audio_sdl-0.1.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| roboflex_audio_sdl-0.1.10-cp311-cp311-macosx_15_0_arm64.whl | CPython 3.11 | CPython 3.11 | macOS 15.0+ ARM64 | Details for roboflex_audio_sdl-0.1.10-cp311-cp311-macosx_15_0_arm64.whl |
Total release size: 1.2 MB
Release files / roboflex_audio_sdl-0.1.10.tar.gz
| Download URL | roboflex_audio_sdl-0.1.10.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d274b8f354c05c09b9b58066a8cb7211fba691c0af6896a104e57b33db0efaf4
|
|
BLAKE2b-256 checksum How to use checksums |
9daf88f0c4a81747e6e244448a91ead9e8b7fdcc7d7cf9b2742f7afb56789d5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.5
|
Release files / roboflex_audio_sdl-0.1.10-cp311-cp311-macosx_15_0_arm64.whl
| Download URL | roboflex_audio_sdl-0.1.10-cp311-cp311-macosx_15_0_arm64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.11 macOS 15.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7162db109960f1757a12ee4a365cfd7cdc3a7ab8ddd975cc4b5860d7dc6a89af
|
|
BLAKE2b-256 checksum How to use checksums |
2b768e49e3bca8947de362d671aea5681ad2f6f9808b3f02304905b34e0c9920
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.5
|
Security for roboflex.audio-sdl 0.1.10
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.