wav-chunk
Read or write INFO chunks from a RIFF WAV file.
Installation
$ pip install wavchunk
Dependencies
- Python 3.6 or higher
Usage
By default, wavchunk adds or gets INFO chunk bytes after the WAV data chunk.
Add INFO chunk
import wavchunk
with open("infile.wav", "rb") as in_file:
with open("outfile.wav", "wb") as out_file:
wavchunk.add_chunk(in_file, "my data".encode(), out_file=out_file)
Get INFO chunk
import wavchunk
with open("infile.wav", "rb") as in_file:
my_data = wavchunk.get_chunk(in_file).decode()
print(my_data)
Command-Line Interface
The wavchunk module can also be used from the command-line.
By default, WAV data is expected on stdin and is written to stdout so that commands can be chained together in a pipe.
Add INFO chunk
$ python3 -m wavchunk add --data 'my data' < infile.wav > outfile.wav
Get INFO chunk
$ python3 -m wavchunk get --data - < infile.wav
<data from chunk>
Delete INFO chunk
$ python3 -m wavchunk get --delete --data mydata.bin < infile.wav > outfile.wav
Metadata
Release files for wavchunk 1.0.2
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 |
|---|---|---|---|---|
| wavchunk-1.0.2.tar.gz | 6.5 kB | Without provenance | Details for wavchunk-1.0.2.tar.gz |
Release files / wavchunk-1.0.2.tar.gz
| Download URL | wavchunk-1.0.2.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f8eef0892332c7414f05f66609b3581281ab4aac5f0d4ae0858944eee6bf310
|
|
BLAKE2b-256 checksum How to use checksums |
ec8730b29d76ebb0e0982de1399d180dbbb1c445cec5038eda3d294f2c187e93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|
Security for wavchunk 1.0.2
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.