Skip to main content

linnet-tts (Python)

Python package for the LinnetTTS native runtime: lightweight on-device text-to-speech at 24 kHz, streaming, fp16 weights, no PyTorch. The extension module is built from the Rust crate runtime/linnet-tts with maturin (abi3, one wheel per platform for every CPython >= 3.9).

Install

pip install linnet-tts soundfile      # soundfile only for writing WAV files in the snippets

Wheels on PyPI: manylinux 2.17 x86_64 and aarch64, macOS 11+ on Apple silicon; no Windows, Intel-macOS or source distribution in 0.2.0 (build from the repository on other platforms, see "Build"). The model files are not in the wheel: download the weights release https://github.com/VoxRT/LinnetTTS/releases/tag/weights-v1 (the fp16 weights, tokenizer.model and a voice .npy). They are licensed under the Linnet Weights License (https://github.com/VoxRT/LinnetTTS/blob/main/WEIGHTS_LICENSE.md), not Apache-2.0. Source, docs and the streaming contract: https://github.com/VoxRT/LinnetTTS.

import linnet_tts, soundfile as sf

model = linnet_tts.Model("linnet-en-35m.fp16.safetensors", "tokenizer.model")
voice = model.load_voice("voice.npy")                     # [T, 48] float32 .npy; prepared for the model

audio = model.synthesize("Hello there.", voice, temp=0.3, cfg=2.0, seed=0)
sf.write("hello.wav", audio, model.sample_rate)           # float32, 24 kHz

session = model.session(voice, seed=0)
session.prime("Streaming gives the first 50 ms of audio after one step.")
for chunk in session:                                     # 80 ms per LM step
    play(chunk)

Voice.from_array(np.ndarray) wraps in-memory [T, 48] latents and Voice.load(path) reads a file without a model; call model.prepare_voice(voice) on those so that sessions skip the voice part of the prime pass (load_voice does it for you, and therefore runs the model once; model.is_prepared(voice) reports whether it was done). With a prepared voice a short sentence primes in 14 ms instead of 67 ms on one desktop core; a re-primed session keeps the voice too. The chunk sizes follow the streaming contract (docs/streaming-contract.md in the repository): the first chunk is samples_per_step - output_delay samples, later ones samples_per_step (1920), the last one output_delay (720) zeros, and the concatenation of all chunks is sample-for-sample identical to synthesize with the same parameters and seed.

Build

cd bindings/python
maturin build --release                     # wheel in target/wheels/
maturin develop --release                   # or: install into the active venv

The release profile uses fat LTO and strips symbols; the wheel is ~0.4 MB. Runtime dependency: numpy.

Test

With the wheel from PyPI: clone the repository, install pytest, and run pytest bindings/python/tests from its root (the tests import the installed linnet_tts). The tests need the model assets (gitignored). Point LINNET_ASSETS at a directory holding linnet-en-35m.fp16.safetensors, tokenizer.model and voices/linnet-en-f1.npy (default: ../../local; local/ = the unpacked weights release, see the root README at https://github.com/VoxRT/LinnetTTS):

uv venv /tmp/linnet-venv && . /tmp/linnet-venv/bin/activate
uv pip install target/wheels/linnet_tts-*.whl pytest
pytest tests

A plain python -m venv /tmp/linnet-venv followed by pip install target/wheels/linnet_tts-*.whl pytest works just as well where uv is not installed.

Metadata

Release files for linnet-tts 0.2.0

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

Built distributions (wheels)

Table of built distributions (wheels) for linnet-tts 0.2.0
File Interpreter ABI Platform Actions
linnet_tts-0.2.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for linnet_tts-0.2.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
linnet_tts-0.2.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for linnet_tts-0.2.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
linnet_tts-0.2.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for linnet_tts-0.2.0-cp39-abi3-macosx_11_0_arm64.whl

Total release size: 1.2 MB

Release files / linnet_tts-0.2.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL linnet_tts-0.2.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 439.3 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
acbd0d89124dd1daef2293743824dc3342103365585295d483cd8c694bb8d2d9
BLAKE2b-256 checksum
How to use checksums
5d90c85337300a2ee87ffae6ec25a59aa44a05d506f128c2cd25fbaefba43701
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / linnet_tts-0.2.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL linnet_tts-0.2.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 415.1 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
396b6deaad5c86dd74d8a594b67feea0e3db4066bc08574c7575a4bc4b2a619a
BLAKE2b-256 checksum
How to use checksums
41f59dbcf42bae513f4b5b32cdcc5e9cd86c0f7271e009548defcc2ff941be08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Release files / linnet_tts-0.2.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL linnet_tts-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
Size 394.4 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
06cc75fa45c8d870a2bd98436e9dba631dade3f1fb7dfbd272ff0dda908d5e9c
BLAKE2b-256 checksum
How to use checksums
0a5cc1e5ff049892bc29e4bac02d22c022dd93532490f3c61362a650a79f4063
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

Security for linnet-tts 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 3 files in this release have been uploaded with provenance metadata.

Select from 3 files

Attestation for linnet_tts-0.2.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 10, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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