realtimetts-qwen-native-cpu
realtimetts-qwen-native-cpu is the CPU-only native binding used by the
RealtimeTTS Qwen CPU server. The distribution name is
realtimetts-qwen-native-cpu; the Python import is qwentts_cpp_cpu, so it
can be installed beside the CUDA package without an import collision.
Version 0.4.0 bundles the qualified qwentts.cpp CPU implementation at
commit ec5336154a68f9e17f95c3d99b3b97489cb090a6 (C ABI v5), including the
parked worker pool, strict affinity handling, onset-silence profiles, and CPU
recovery path. Model weights and voice references are not included.
CPU scheduling
Pass cpu_codec_threads with a positive worker count to overlap audio decoding with code generation. cpu_stream_frames=2 selects 160 ms delivery chunks; zero retains the native default. Optional cpu_affinity and cpu_codec_affinity are logical-CPU masks; zero leaves scheduling to the OS. Defaults remain serial.
Set QWENTTS_CPU_STARTUP_PRIORITY=second_chunk before constructing a CPU context to prioritize the second decode block; unset/off preserves normal overlap. Requires overlap and a two/four-frame cadence, and is not a quality or sampling setting. See 0.4.0 release notes for measurements and limitations.
Install
In a fresh virtual environment, install the matching wheel from PyPI:
python -m pip install --upgrade pip
python -m pip install "realtimetts-qwen-native-cpu==0.4.0"
python -c "import qwentts_cpp_cpu as q; print(q.__version__, q.QT_ABI_VERSION, q.CPU_ONLY)"
The release provides these CPU wheels:
| Platform | Wheel baseline |
|---|---|
| Linux x86_64 | manylinux_2_35_x86_64 (glibc 2.35 or newer) |
| Windows x86_64 | win_amd64 |
| macOS Intel | macosx_13_0_x86_64 |
| macOS Apple Silicon | macosx_11_0_arm64 |
The native payload has no CUDA, Metal, Vulkan, OpenMP, or BLAS dependency.
The x86_64 builds use GGML_NATIVE=OFF with a fixed AVX2/FMA/F16C/BMI2
kernel baseline; they require a CPU with those features. The macOS arm64
wheel is built separately for Apple Silicon. There is no runtime CPU
dispatcher or generic x86 fallback.
Only the four platform families above have bundled native wheels. On another
platform, do not rely on an automatic source fallback: the sdist intentionally
refuses to create a wheel without the pinned native library and a qualified
qwentts.cpp checkout.
Use
from qwentts_cpp_cpu import QwenLibrary, QwenTTS
library = QwenLibrary()
assert library.cpu_only()
print(library.version())
Model files can be resolved from the configured Hugging Face repository:
from qwentts_cpp_cpu import resolve_gguf_paths
talker, codec = resolve_gguf_paths(
"Qwen/Qwen3-TTS-12Hz-0.6B-Base", quant="Q8_0"
)
The full RealtimeTTS CPU server supplies HTTP streaming, segmentation, language detection, and recovery behavior on top of this binding.
Build from source
Clone this repository and the pinned native source, then build the wheel and sdist:
# Requires CMake, a C++ compiler, and the platform's native build tools.
git clone --branch codex/qwen-cpu-public-release https://github.com/KoljaB/realtimetts-qwen-native.git
cd realtimetts-qwen-native
git clone https://github.com/KoljaB/qwentts.cpp.git third_party/qwentts.cpp
git -C third_party/qwentts.cpp checkout ec5336154a68f9e17f95c3d99b3b97489cb090a6
git -C third_party/qwentts.cpp submodule update --init --recursive
python -m pip install --upgrade build
python scripts/build_native.py --source third_party/qwentts.cpp --backend cpu --clean
python -m build --sdist --wheel
The build helper verifies the native revision and ABI before configuring CMake.
The wheel bundles only qwen, ggml, ggml-base, and ggml-cpu shared
libraries with an origin-relative runtime path; it refuses a build with no
native payload.
Metadata
Release files for realtimetts-qwen-native-cpu 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| realtimetts_qwen_native_cpu-0.4.0.tar.gz | 41.4 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| realtimetts_qwen_native_cpu-0.4.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details |
| realtimetts_qwen_native_cpu-0.4.0-py3-none-manylinux_2_35_x86_64.whl | Python 3 | none | Linux glibc 2.35+ x86-64 | Details |
| realtimetts_qwen_native_cpu-0.4.0-py3-none-macosx_13_0_x86_64.whl | Python 3 | none | macOS 13.0+ x86-64 | Details |
| realtimetts_qwen_native_cpu-0.4.0-py3-none-macosx_11_0_arm64.whl | Python 3 | none | macOS 11.0+ ARM64 | Details |
Total release size: 5.2 MB
Release files / realtimetts_qwen_native_cpu-0.4.0.tar.gz
| Download URL | realtimetts_qwen_native_cpu-0.4.0.tar.gz |
|---|---|
| Size | 41.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2d0cf1143670ad1115fc1ab5ae69bf1a73aaf5339ca3fb30caf9e7b57afda3f9
|
|
BLAKE2b-256 checksum How to use checksums |
48b473bc46b48714645989754df6dad622bfe96558d8644900a9eb88863f4693
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Release files / realtimetts_qwen_native_cpu-0.4.0-py3-none-win_amd64.whl
| Download URL | realtimetts_qwen_native_cpu-0.4.0-py3-none-win_amd64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
9aedc3ca0a0714ef9d88f65e1c65380db6a352765950416a00f19f27bcdccca7
|
|
BLAKE2b-256 checksum How to use checksums |
6ec4123f7791472208f45b816838bc985d5b71a56d9bb5546d5b764cbb79ce45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Release files / realtimetts_qwen_native_cpu-0.4.0-py3-none-manylinux_2_35_x86_64.whl
| Download URL | realtimetts_qwen_native_cpu-0.4.0-py3-none-manylinux_2_35_x86_64.whl |
|---|---|
| Size | 907.2 kB |
| Tags | Linux glibc 2.35+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
9ab601df762767f48ea157d1def60847c8f9ec3503c0593b4801d75e9c47af15
|
|
BLAKE2b-256 checksum How to use checksums |
2639a633420b03bb2cb36cafbf0a9cebb76b80b0fdfd8dbe63f09420add7b34c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Release files / realtimetts_qwen_native_cpu-0.4.0-py3-none-macosx_13_0_x86_64.whl
| Download URL | realtimetts_qwen_native_cpu-0.4.0-py3-none-macosx_13_0_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | Python 3 macOS 13.0+ x86-64 |
|
SHA-256 checksum How to use checksums |
94a6338e7bd5343a204566a51a9851ebf708072bccfc512fc43077a942568705
|
|
BLAKE2b-256 checksum How to use checksums |
59fcf4ded190496645cdd767570d7fa8be8d1c170487b88d8aa5500938e9a116
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|
Release files / realtimetts_qwen_native_cpu-0.4.0-py3-none-macosx_11_0_arm64.whl
| Download URL | realtimetts_qwen_native_cpu-0.4.0-py3-none-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Python 3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
84e94ddb78981165ca15bd225c5bc37d426253063246b9225a7de5d56c86dc14
|
|
BLAKE2b-256 checksum How to use checksums |
c5f73f22b5c952c7a49193dd2bc386ae38ff7c784a72c6d5bd7c9a3b295542be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.4
|