Skip to content

Bogo-Sort/qoa-python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QOA-Python

The Quite OK Audio Format for Fast, Lossy Compression

A Python wrapper around qoa Written using the 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')

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published