pywav
Reading WAV files with PCM/PCMA/PCMU compression or without compression.
WavRead and WavWrite
There are two classes WavRead and WavWrite which will perform reading and writing of wave files respectively. Currenlty PCM, PCMU and PCMA formats are supported. You will get the raw data from the RTP stream which you can write into the wave file by providing information about the audio format, number of channels, sample rate etc.
Reading example
wave_read = pywav.WavRead("<filename to read>")
# print parameters like number of channels, sample rate, bits per sample, audio format etc
# Audio format 1 = PCM (without compression)
# Audio format 6 = PCMA (with A-law compression)
# Audio format 7 = PCMU (with mu-law compression)
print(wave_read.getparams())
Writing example
# first parameter is the file name to write the wave data
# second parameter is the number of channels, the value can be 1 (mono) or 2 (stereo)
# third parameter is the sample rate, 8000 samples per second
# fourth paramaer is the bits per sample, 8 bits per sample
# fifth parameter is the audio format, 1 means PCM with no compression.
wave_write = pywav.WavWrite("<filename to write>", 1, 8000, 8, 1)
# raw_data is the byte array. Write can be done only once for now.
# Incremental write will be implemented later
wave_write.write(<raw data>)
# close the file stream and save the file
wave_write.close()
Metadata
Release files for pywav 1.1
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 |
|---|---|---|---|---|
| pywav-1.1.tar.gz | 14.8 kB | Without provenance | Details for pywav-1.1.tar.gz |
Release files / pywav-1.1.tar.gz
| Download URL | pywav-1.1.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
995456db220b4af64750018476d3c93df405e34dc98433ea6a71a8ff12b94f3a
|
|
BLAKE2b-256 checksum How to use checksums |
eabc5a802ec98672af0aa05c7ac0a6f9e138c3948c8e9d33ae710600693b11b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
Python-urllib/3.6
|
Security for pywav 1.1
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.