Skip to main content

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.2 routes prompt diagnostics through the log callback so server logging can avoid blocking inference. It bundles the qwentts.cpp CPU implementation at commit 4d80a091a15881e32e9ede6aea38a9102c66f0da (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 CHANGELOG.md 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.2"
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 4d80a091a15881e32e9ede6aea38a9102c66f0da
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.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for realtimetts-qwen-native-cpu 0.4.2
File Size Uploaded
realtimetts_qwen_native_cpu-0.4.2.tar.gz 42.2 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for realtimetts-qwen-native-cpu 0.4.2
File
realtimetts_qwen_native_cpu-0.4.2-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
realtimetts_qwen_native_cpu-0.4.2-py3-none-manylinux_2_35_x86_64.whl Python 3 none Linux glibc 2.35+ x86-64 Details
realtimetts_qwen_native_cpu-0.4.2-py3-none-macosx_13_0_x86_64.whl Python 3 none macOS 13.0+ x86-64 Details
realtimetts_qwen_native_cpu-0.4.2-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.2.tar.gz

Download URL realtimetts_qwen_native_cpu-0.4.2.tar.gz
Size 42.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d2525539add7547b1eea3cc9496fdefbf8f5a9e5f2d5d5cf76720e8d576d472e
BLAKE2b-256 checksum
How to use checksums
70e5d6e658f0d9b28fc6d8641254ebc3fde26639b06dd1f5d92ac7fa91d5a588
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.5

Release files / realtimetts_qwen_native_cpu-0.4.2-py3-none-win_amd64.whl

Download URL realtimetts_qwen_native_cpu-0.4.2-py3-none-win_amd64.whl
Size 1.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
93e47ad4deca65ac78bcf96dea2a22315d89503c4383a46609cb40487dfd1e6f
BLAKE2b-256 checksum
How to use checksums
d6da93f2180297b9aeb8c28df0476bf5ed3b5cf7d6a59558b575bef323613294
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.5

Release files / realtimetts_qwen_native_cpu-0.4.2-py3-none-manylinux_2_35_x86_64.whl

Download URL realtimetts_qwen_native_cpu-0.4.2-py3-none-manylinux_2_35_x86_64.whl
Size 907.3 kB
Tags Linux glibc 2.35+ x86-64 Python 3
SHA-256 checksum
How to use checksums
eb04e35d2961a585abdadf9dc3d164a8f265d32bd49ccd38d46b4c07ca294e84
BLAKE2b-256 checksum
How to use checksums
be6f3237059f37c69463148550e43642269bfea4a8a2aabd3bcc7957216d1e8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.5

Release files / realtimetts_qwen_native_cpu-0.4.2-py3-none-macosx_13_0_x86_64.whl

Download URL realtimetts_qwen_native_cpu-0.4.2-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
0964058281c50531a78023441eddfcda3fd6c679b327f210b2b47c83e3fc399b
BLAKE2b-256 checksum
How to use checksums
452ddfda30dd2fd4c149adb2bbd75a4503f262ae35fcfe6fc3ae239e04cdd0ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.5

Release files / realtimetts_qwen_native_cpu-0.4.2-py3-none-macosx_11_0_arm64.whl

Download URL realtimetts_qwen_native_cpu-0.4.2-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
4aef0209b79b46d40202d196f920bcede0c020f609d9df38b1abf6d706f7ef5a
BLAKE2b-256 checksum
How to use checksums
92f1f1ea3b5b2b0e191aa15e4a322eb5de67d66c240821512ac4c7c67939d492
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.4.2 This release

5 release files

0.4.1

5 release files

0.4.0

5 release files

0.3.0

5 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page