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.1 bundles the qualified qwentts.cpp CPU implementation at commit 791d7df22afc408b3786fbe694c421ce055ae5d5 (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.1"
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 791d7df22afc408b3786fbe694c421ce055ae5d5
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.1

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.1
File Size Uploaded
realtimetts_qwen_native_cpu-0.4.1.tar.gz 41.4 kB Details

Built distributions (wheels)

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

Download URL realtimetts_qwen_native_cpu-0.4.1.tar.gz
Size 41.4 kB
Tags Source
SHA-256 checksum
How to use checksums
36f44c6dd8934a6dbd3fe538bd7faa841ab7f4ca56c6c79867e696ce482d07d9
BLAKE2b-256 checksum
How to use checksums
84274aeaa31db3c494ac7eeefa26105745234450bf07c9164a404f230075030d
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.1-py3-none-win_amd64.whl

Download URL realtimetts_qwen_native_cpu-0.4.1-py3-none-win_amd64.whl
Size 1.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
5db18d6e2052ae3fd1a300c549eb9af4ce3ef2a0eb16555bf71d927302957ff3
BLAKE2b-256 checksum
How to use checksums
65d86639cf9c1c2aeab635919f146729bb91570a4a2fcbad4b0c074c95249aac
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.1-py3-none-manylinux_2_35_x86_64.whl

Download URL realtimetts_qwen_native_cpu-0.4.1-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
d6f431393ab2fe2fda2d074a2752ca72e89f25e8392df0c3825b89c7ada29978
BLAKE2b-256 checksum
How to use checksums
b6fa8d2dae34f34760f4996a689a710a1baf630aa00982d6f98228f8761937b8
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.1-py3-none-macosx_13_0_x86_64.whl

Download URL realtimetts_qwen_native_cpu-0.4.1-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
6f355005a955f83e49472983c07a9f7aa8e4e8879637f6e524ba8831a23a3036
BLAKE2b-256 checksum
How to use checksums
f324d921905d752a386dbbb433f5d18a92bf467bb28e780e5762e7b8becaa2b9
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.1-py3-none-macosx_11_0_arm64.whl

Download URL realtimetts_qwen_native_cpu-0.4.1-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
b7474a4a8e6789cb26c67f50e59ff994ff088cc5a62f773443df5f46d858f57c
BLAKE2b-256 checksum
How to use checksums
f4091d17a0ba949b53dde4ebb92d749860bc18a07e90f4f7a222f1542fc49392
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.4

Release history Release notifications | RSS feed

0.4.2

5 release files

This release

0.4.1 This release

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