Metadata-Version: 2.4
Name: gapiring
Version: 0.1.1
Summary: Uzbek text-to-speech on a CPU: two voices, roles and manners by name, streaming audio
License: Gapiring Licence, version 1.0 (2026-11-24)
        
        Gapiring (the models, the voices and the software published with them) is made by Gapi, https://gapi.uz.
        
        1. Free use. Individuals, and companies whose annual revenue is under 1,000,000 US dollars, may use Gapiring free of
           charge, including in commercial products.
        
        2. Commercial licence. A company whose annual revenue is 1,000,000 US dollars or more needs a commercial licence to
           use Gapiring. It is inexpensive and settled in one conversation: https://gapi.uz/gapiring
        
        3. Model files. The model files are sent on request: https://gapi.uz/gapiring
        
        4. Attribution. Gapiring is an adaptation of Kyutai Pocket TTS for Uzbek. Kyutai Pocket TTS is licensed under
           CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Keep this notice with every copy.
        
        5. No warranty. Gapiring is provided as is, without warranty of any kind.
        
Keywords: tts,text-to-speech,uzbek,onnx,edge
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: onnxruntime>=1.23
Requires-Dist: tokenizers
Requires-Dist: huggingface_hub
Dynamic: license-file

# 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.

```bash
pip install gapiring
gapiring say "Assalomu alaykum! Sizga qanday yordam bera olaman?" --voice f1 --role assistant --manner warm --out hello.wav
```

```python
from gapiring import Gapiring

tts = Gapiring("edge", dictionary=True, normalize="literary")
tts.save("order.wav", "Buyurtmangiz 25-noyabr soat 14:30 da yetkaziladi, to'lov Payme orqali.", voice="m1", role="operator", manner="calm")

for chunk in tts.stream("Oyimning tug'ilgan kuniga sovg'a buyurtma qilgandim.", 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 sent on request: https://gapi.uz/gapiring. With access to the model repository `islomov/gapi-uz-gapiring-v1`, set
`HF_TOKEN` to your Hugging Face token and the files are downloaded on first use and cached; with the files 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]`.
Give the model one sentence or a short paragraph per call.

## 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).

## Licence

Free for individuals and for companies with annual revenue under $1 million, commercial products included; larger companies need an inexpensive commercial licence. Model files are sent on request: https://gapi.uz/gapiring. Full text: `LICENSE`.
