Pre-built Python wheels with native extensions for Android/Chaquopy.
| Package | Version | Python | Description |
|---|---|---|---|
| pycodec2 | 4.1.1 | 3.13 | Python bindings for Codec2 low-bitrate speech codec |
python {
pip {
install "pycodec2 @ https://github.com/torlando-tech/android-python-wheels/releases/download/v1.0.0/pycodec2-4.1.1-cp313-cp313-android_21_arm64_v8a.whl"
}
}pycodec2 @ https://github.com/torlando-tech/android-python-wheels/releases/download/v1.0.0/pycodec2-4.1.1-cp313-cp313-android_21_arm64_v8a.whl ; platform_machine == 'aarch64'
pycodec2 @ https://github.com/torlando-tech/android-python-wheels/releases/download/v1.0.0/pycodec2-4.1.1-cp313-cp313-android_21_x86_64.whl ; platform_machine == 'x86_64'
arm64_v8a- 64-bit ARM (most modern Android devices)x86_64- 64-bit x86 (emulators on Intel/AMD)
This repository uses cibuildwheel with Android platform support to:
- Cross-compile the Codec2 C library for each Android ABI using the Android NDK
- Build pycodec2 Python extension against it
- Bundle everything into Android-compatible wheels
- Publish to GitHub Releases on tag push
- Python 3.13+
- cibuildwheel
- Android NDK
# Install cibuildwheel
pip install cibuildwheel
# Clone this repo
git clone https://github.com/torlando-tech/android-python-wheels.git
cd android-python-wheels
# Download sources
wget https://github.com/drowe67/codec2/archive/refs/tags/v1.2.0.tar.gz
tar xzf v1.2.0.tar.gz && mv codec2-1.2.0 codec2-src
pip download --no-deps --no-binary :all: pycodec2==4.1.1
tar xzf pycodec2-4.1.1.tar.gz
cd pycodec2-4.1.1
# Copy codec2 source
cp -r ../codec2-src .
# Build for Android
cibuildwheel --platform android --output-dir ../distChaquopy enables running Python in Android apps but cannot compile native extensions at build time. Packages like pycodec2 that wrap C libraries need to be pre-built.
This repository provides GitHub Actions CI that cross-compiles these packages for Android.
- Codec2 - Open source speech codec
- pycodec2 - Python bindings for Codec2
- Chaquopy - Python for Android
- LXST - Voice calls over Reticulum (uses Codec2)
- cibuildwheel - Build Python wheels for all platforms
Build scripts: MIT
The built wheels contain:
- Codec2: LGPL-2.1
- pycodec2: Apache-2.0