Skip to main content

Gapiring

Uzbek text-to-speech that runs on an ordinary CPU, with no GPU and no server. Two voices (f1 female, m1 male), a role and a manner of speech by name, including an emotional mode, and audio that streams as it is made.

pip install gapiring
gapiring say "Assalomu alaykum! Namuna kompaniyasining virtual yordamchisiman, sizga qanday yordam bera olaman?" --voice f1 --role assistant --manner warm --out hello.wav
from gapiring import Gapiring

tts = Gapiring("edge", dictionary=True, normalize="literary")
tts.save("meeting.wav", "Uchrashuv 25-noyabr soat 14:30 da, to'lov Payme orqali, narxi 1 250 000 so'm.", voice="m1", role="operator", manner="calm")

for chunk in tts.stream("Oyimning tug'ilgan kuniga sovg'a buyurtma qilgandim, [sigh] vaqtida olib kelmadinglar, rosa xafa bo'ldim to'g'risi.", voice="f1", role="emotional", manner="upset"):
    play(chunk)          # float32, 24 kHz mono, the first chunk after about 20 ms on a desktop CPU
edge large
Transformer layers 6 24
Download 117 MB (int8) 346 MB (int8) or 1.3 GB (full precision)
Speed, 2 CPU threads about 10x real time about 4x real time (int8)
For CPU, phone class devices server, desktop

The model files are downloaded from the public repository islomov/gapi-uz-gapiring-v1 on Hugging Face on first use and cached; with the files already on disk, pass Gapiring("edge", path="folder").

Roles and manners

role manner
operator neutral warm cheerful empathetic calm dictation persuasive brisk
assistant neutral warm cheerful empathetic calm dictation soothing
emotional angry upset irritated worried tired sceptical confused hurried joking grateful curious friendly calm elderly

gapiring manners prints the same list. Sounds go inside the text: [laugh], [sigh], [pause], [breath]. A text of any length can be given: it is spoken sentence by sentence (the model itself speaks one sentence or a short paragraph at a time). The apostrophe variants of o' and g' (ʻ, ʼ, ‘, ’) are read as the plain one.

Text

normalize="literary" reads numbers, dates, times, money, percentages, units and phone numbers out as words and turns Cyrillic into Uzbek Latin; "conversational" also uses the Tashkent spoken forms. dictionary=True reads English words, brands and acronyms the Uzbek way (Payme -> Peymi, CRM -> si-ar-em, deadline -> dedlayn); it takes about 4 s and 400 MB to load, so leave it out on small devices when the text has no English. tts.said(text) shows the text as the voice gets it.

Dependencies: numpy, onnxruntime, tokenizers, huggingface_hub. Built on Kyutai Pocket TTS (CC-BY-4.0).

Synthesis runs on your machine; after the model is downloaded nothing is sent anywhere. Recent ONNX Runtime builds report usage to Microsoft by default: this package switches that off (ORT_DISABLE_TELEMETRY=1) when it is imported, so import gapiring before onnxruntime if you use both. A value you set yourself is left alone.

Licence

Open source, free for any use, commercial use included. The code is under the MIT licence; the model files, voices and dictionary are under CC BY 4.0 (credit: Gapiring by Gapi, an adaptation of Kyutai Pocket TTS). Full text: LICENSE.

Metadata

Release files for gapiring 0.1.3

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

Source distribution (sdist)

Source distribution for gapiring 0.1.3
File Size Uploaded Provenance Actions
gapiring-0.1.3.tar.gz 74.1 kB Without provenance Details for gapiring-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gapiring 0.1.3
File Interpreter ABI Platform Actions
gapiring-0.1.3-py3-none-any.whl Python 3 none any Details for gapiring-0.1.3-py3-none-any.whl

Total release size: 157.9 kB

Release files / gapiring-0.1.3.tar.gz

Download URL gapiring-0.1.3.tar.gz
Size 74.1 kB
Tags Source
SHA-256 checksum
How to use checksums
18a848ae6fd2ef773d2f69d2fe2b2705e2b4da4ce1f320854f5f7d15c2a17235
BLAKE2b-256 checksum
How to use checksums
2ca7ff1c32a127f82a06225848fff02955eb88395c3fa249afc79d722b29d4c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.13

Release files / gapiring-0.1.3-py3-none-any.whl

Download URL gapiring-0.1.3-py3-none-any.whl
Size 83.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90b6a3704eb3db59ced904c2d0d1240b562bc37e6e0af8918072fc25f30ca872
BLAKE2b-256 checksum
How to use checksums
192f47abe78083cd5f9540bd101ebab0d6b3d6ce19c283d1d0cd4c9ceb8a6fd7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.13

Security for gapiring 0.1.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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