ovoz — offline o'zbekcha nutq
Ovoz → matn (STT) va matn → ovoz (TTS) — bitta paketda, to'liq internetsiz, torch'siz, oddiy CPU'da ishlaydi. Natija istalgan alifboda: lotin, yangi alifbo, kirill.
pip install ovoz
from ovoz import STT, TTS
# Ovoz → matn
stt = STT() # 744 MB model bir marta yuklanadi, keyin offline
print(stt.transcribe("ovoz.ogg")) # bugun oʻqituvchi maʼlumot berdi
print(stt.transcribe("ovoz.ogg", script="new")) # bugun öqituvçi maʼlumot berdi
print(stt.transcribe("ovoz.ogg", script="cyrl")) # бугун ўқитувчи маълумот берди
# Matn → ovoz
tts = TTS() # 117 MB model bir marta yuklanadi
tts.save("javob.ogg", "Besh ming so'm chiqim yozildi.", voice="f1", style="warm")
tts.save("kitob.mp3", open("bob.txt").read(), voice="m1", style="book")
Modellar faqat ishlatilganda yuklanadi: faqat TTS kerak bo'lsa, STT modeli umuman yuklanmaydi.
Buyruq qatori
ovoz stt ovoz.mp3 # matn
ovoz stt ovoz.mp3 --script cyrl # kirillda
ovoz stt video.mp4 --srt # video.srt subtitr
ovoz stt ovoz.mp3 --json # bo'laklar, so'zlar va vaqtlar
ovoz stt ovoz.mp3 --device mps # Apple Silicon'da ~2× tezroq
ovoz tts "Assalomu alaykum!" -o salom.ogg
ovoz tts "Hisobingizda 250 000 so'm bor" -o balans.mp3 --voice m1 --style calm --pace slow
ovoz tts -f kitob.txt -o kitob.mp3 --style book
STT
| Parametr | Qiymatlar |
|---|---|
script= |
lat (oʻ, gʻ — standart), new (ö, ğ, ş, ç — 2027-yil 22-apreldan), lat_ascii (o', g'), cyrl (кирилл) |
| kirish | fayl yo'li (mp3, wav, ogg, m4a, mp4, webm …), ochiq fayl yoki 16 kHz numpy massiv |
stt.segments(...) |
uzun audio — bo'lak-bo'lak, vaqt bilan |
word_timestamps=True |
har bir so'zning vaqti |
initial_prompt="Chilonzor, Yunusobod" |
kerakli nom va atamalarni ko'rsatish |
STT(device="mps") / STT(device="cuda") |
Apple Silicon / NVIDIA GPU |
STT(local_files_only=True) |
internetga umuman chiqmaydi |
Aniqlik va tezlik — 10 ta podkast parchasi (Toshkent shevasi, ruscha aralash) va o'qitishda ishlatilmagan 54 soniyalik yozuvda (WER — so'z xatosi, kam bo'lsa yaxshi):
| WER (podkast) | WER (yangi ovoz) | Tezlik (Apple M5) | |
|---|---|---|---|
| Asl rubaiSTT v2 (transformers + torch) | 15,1% | 21,4% | 1,9× real vaqt |
| ovoz STT (int8, CPU, 4 oqim) | 16,2% | 17,9% | 2,8× real vaqt |
ovoz STT (device="mps") |
— | — | ~6,5× real vaqt |
TTS
| Parametr | Qiymatlar |
|---|---|
voice= |
f1 (ayol), m1 (erkak) |
style= |
warm neutral cheerful calm empathetic serious dictation operator persuasive book news tale joking angry upset elderly |
pace= |
slow, normal, fast (hamma uslubda ham emas — mos kelmasa odatiy tezlik) |
| fayl formati | .wav, .ogg (Telegram ovozli xabari), .mp3, .m4a — kengaytmaga qarab |
TTS("large") |
ovozi tozaroq (346 MB), TTS("nano") — eng kichik (31 MB, bitta ovoz) |
Sonlar, sanalar, pul miqdorlari so'z bilan o'qiladi. Lotin, kirill va yangi alifbodagi matnni tushunadi;
[pause], [laugh], [breath], [sigh] belgilari ishlaydi. tts.stream(...) — jonli ijro uchun bo'laklar.
Litsenziya
Kod — MIT. Modellar paketga kiritilmagan, birinchi ishlatilganda Hugging Face'dan yuklanadi:
- STT: ziyodev/stt-ziyodev-medium-int8 — rubaiSTT v2 Medium (Islomov, Whisper Medium asosida), Apache 2.0; CTranslate2 int8 formatiga o'girilgan
- TTS: ziyodev/ovoz-tts —
Gapiring v2 va Nano modellarining o'zgartirilmagan nusxasi:
Gapiring by Gapi, an adaptation of Kyutai Pocket TTS, CC BY 4.0. TTS bilan yaratilgan audioni tarqatganda shu
mualliflikni ko'rsating. Gapiring'ning ishga tushirish kodi (MIT) paket ichida:
ovoz/_gapiring.
Paket asl Gapiring paketi yoki repo'lariga bog'liq emas — ular o'chirilsa ham ishlayveradi.
Batafsil: NOTICE.
Metadata
Release files for ovoz 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ovoz-0.1.0.tar.gz | 85.0 kB | Without provenance | Details for ovoz-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ovoz-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ovoz-0.1.0-py3-none-any.whl |
Total release size: 188.3 kB
Release files / ovoz-0.1.0.tar.gz
| Download URL | ovoz-0.1.0.tar.gz |
|---|---|
| Size | 85.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a08320069f75eb3337a6b7a403a73e7c551b8a0a17be035c2398d0e0b080dd9c
|
|
BLAKE2b-256 checksum How to use checksums |
d8e64cfdd0725faae6680d7fc0d99e29c3c9ed585d3ce0cb33aeea60f3bcfbba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Release files / ovoz-0.1.0-py3-none-any.whl
| Download URL | ovoz-0.1.0-py3-none-any.whl |
|---|---|
| Size | 103.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a6260d84512ba5465f6c0bb52d6a90da8f7789f740a7cc6b94b83a3f049376a
|
|
BLAKE2b-256 checksum How to use checksums |
96e157ff9b8e5affc2d99d5988142c2a5a9bdc259390d32777a737290f291e05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.5
|
Security for ovoz 0.1.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.
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.