Skip to main content

A library for reading and writing QOA files

Project description

QOA-Python

The Quite OK Audio Format for Fast, Lossy Compression

A Python wrapper around qoa Written using the amazing CFFI library.

Why?

  • QOA is fast. It decodes audio 3x faster than Ogg-Vorbis, while offering better quality and compression (278 kbits/s for 44khz stereo) than ADPCM.
  • QOA is simple. The reference en-/decoder fits in about 400 lines of C. The file format specification is a single page PDF.
  • Multi-threaded - Cffi unlocks the GIL

Install

pip install qoa

Usage

You can use the qoa library to encode and decode audio files. Here's a basic example:

import qoa

# Read an audio file
np_array = qoa.read('path/to/file')

# Write an audio file
qoa.write(np_array , 'path/to/file')

# Decode an audio file
buffer,shape = qoa.decode('path/to/file')

# Encode an audio file
ffi_buffer = qoa.encode(np_array)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

qoa-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qoa-0.1.0-cp311-cp311-win_amd64.whl (14.1 kB view details)

Uploaded CPython 3.11Windows x86-64

File details

Details for the file qoa-0.1.0.tar.gz.

File metadata

  • Download URL: qoa-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for qoa-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ea89bdc7d4c0af56dd94909fb1cc87b19375b5a3f4630d1fa8392a359698f0f0
MD5 b36de0b52a4859633736372036b547f4
BLAKE2b-256 73d21b04b7e8b0b997bb8672dfc9ccc032b7ff7d4d15f64aa127e72538d43d1d

See more details on using hashes here.

File details

Details for the file qoa-0.1.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: qoa-0.1.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for qoa-0.1.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 06168ba2365b5de7649551371a4f3332f7cc6aee04ccc633f787c0205ad163d0
MD5 2bfeb1aea343881e072f2d515e4017f6
BLAKE2b-256 b0bcb50ff75557039599f8f0ecfae46c4a17f2c2f4d25111415043ca03fd538a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page