seaplayer-audio
Description
The SeaPlayer library for async/sync playback audio.
The module is still under DEVELOPMENT, so I do not recommend using it in your projects.
Supported formats
It is based on the sounddevice and soundfile module.
soundfile, in turn, is a wrapper of the C library libsndfile, which has limitations in file reading formats. More info...
Usage (synchronously)
Through context manager
import time
from seaplayer_audio import CallbackSoundDeviceStreamer, FileAudioSource
def main():
with FileAudioSource('example.mp3') as source:
with CallbackSoundDeviceStreamer() as streamer:
while len(data := source.readline(1)) > 0:
streamer.send( data )
time.sleep(0.01) # Optional
if __name__ == '__main__':
main()
Through cycle
import time
from seaplayer_audio import CallbackSoundDeviceStreamer, FileAudioSource
def main():
file = FileAudioSource('example.mp3')
streamer = CallbackSoundDeviceStreamer()
streamer.start()
while len(data := source.readline(1)) > 0:
streamer.send( data )
time.sleep(0.01) # Optional
streamer.stop()
file.close()
if __name__ == '__main__':
main()
Usage (asynchronously)
Through context manager
import asyncio
from seaplayer_audio import AsyncCallbackSoundDeviceStreamer, AsyncFileAudioSource
async def main():
async with AsyncFileAudioSource('example.mp3') as source:
async with AsyncCallbackSoundDeviceStreamer() as streamer:
while len(data := await source.readline(1)) > 0:
await streamer.send( data )
await asyncio.sleep(0.01) # Optional
if __name__ == '__main__':
asyncio.run(main())
Through cycle
import asyncio
from seaplayer_audio import AsyncCallbackSoundDeviceStreamer, AsyncFileAudioSource
async def main():
file = FileAudioSource('example.mp3')
streamer = CallbackSoundDeviceStreamer()
await streamer.start()
while len(data := await source.readline(1)) > 0:
await streamer.send( data )
await asyncio.sleep(0.01) # Optional
await streamer.stop()
await file.close()
if __name__ == '__main__':
asyncio.run(main())
Metadata
Release files for seaplayer-audio 0.5.12
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 |
|---|---|---|---|---|
| seaplayer_audio-0.5.12.tar.gz | 12.6 kB | Without provenance | Details for seaplayer_audio-0.5.12.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| seaplayer_audio-0.5.12-py3-none-any.whl | Python 3 | none | any | Details for seaplayer_audio-0.5.12-py3-none-any.whl |
Total release size: 31.3 kB
Release files / seaplayer_audio-0.5.12.tar.gz
| Download URL | seaplayer_audio-0.5.12.tar.gz |
|---|---|
| Size | 12.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
26f35548da716cda8980a4b38d96e95dbfbc7fdd97b238ef79a9b8c602bbd37c
|
|
BLAKE2b-256 checksum How to use checksums |
2e2d5213277d2719e214dc1222a712333fd6db02ac7fe18bd758fd9270a9cd8c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.12.8 Windows/10
|
Release files / seaplayer_audio-0.5.12-py3-none-any.whl
| Download URL | seaplayer_audio-0.5.12-py3-none-any.whl |
|---|---|
| Size | 18.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7e6ad2956244f9818ba057c4e5be5921aecc416747bcafd36cd42e92902b98c4
|
|
BLAKE2b-256 checksum How to use checksums |
dcfa8b62c9e75265c1ba4f91488f0a727ce127350153824b91fc9d83fc2a6090
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.12.8 Windows/10
|
Security for seaplayer-audio 0.5.12
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.