VNTTS
Dự án tích hợp Vietnamese Text-to-Speech (TTS) và Speech-to-Text (STT):
- TTS:
nghitts/ Piper-compatible ONNX (giọng Banmai) - STT:
sherpa-onnx-zipformer-vi-2025-04-20
Cấu trúc dự án
VNTTS/
src/vntts/
__init__.py
tts.py
stt.py
model_downloader.py # Downloads models from GitHub Releases
model_parts.py # Helpers for split/merge model files
scripts/
split_model.py
merge_model.py
tests/
README.md
Cài đặt
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
Model Loading
Models are automatically downloaded from GitHub Releases on first use.
When TTS() or STT() is instantiated without an explicit model_dir,
the library:
- Checks if the models directory exists (default:
./models) - If not, downloads
models.zipfrom the configured GitHub Release URL - Extracts the zip and removes the archive
- Subsequent runs skip the download (idempotent)
Environment Variables
| Variable | Description | Default |
|---|---|---|
VNTTS_MODELS_DIR |
Root directory for models | models |
VNTTS_MODELS_URL |
URL for models.zip |
(GitHub Release) |
VNTTS_MODEL_DOWNLOAD_TIMEOUT_SECONDS |
Network timeout | 120 |
VNTTS_MODEL_DOWNLOAD_RETRIES |
Retry attempts | 3 |
VNTTS_MODEL_DOWNLOAD_LOG |
Set 0 to disable logs |
1 |
Explicit Model Directory
You can also provide your own model directory:
from vntts import TTS, STT
tts = TTS(model_dir="/path/to/tts/models")
stt = STT(model_dir="/path/to/stt/models")
Testing
pytest
Building
python -m build
Metadata
Release files for vntts 0.1.5
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 |
|---|---|---|---|---|
| vntts-0.1.5.tar.gz | 13.9 kB | Without provenance | Details for vntts-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vntts-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for vntts-0.1.5-py3-none-any.whl |
Total release size: 26.0 kB
Release files / vntts-0.1.5.tar.gz
| Download URL | vntts-0.1.5.tar.gz |
|---|---|
| Size | 13.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
056be082bd3b3699b0dadc132736f88fd3a439824f7267dee69391b3b8030ea4
|
|
BLAKE2b-256 checksum How to use checksums |
30c39876bacd3daf0949c7dedaf84d073f5809bf51bf0fc5917d27c9d36ffb0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Release files / vntts-0.1.5-py3-none-any.whl
| Download URL | vntts-0.1.5-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dc708984a063c90bbadb261e2dc1c0576251d46e0781f3c2978998da9ab96459
|
|
BLAKE2b-256 checksum How to use checksums |
4464b3caaadf573f43889f984764adbcf125f898ebfb65418917325773eb56f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Security for vntts 0.1.5
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.