Skip to main content

VNTTS

Dự án tích hợp Vietnamese Text-to-Speech (TTS) và Speech-to-Text (STT):

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:

  1. Checks if the models directory exists (default: ./models)
  2. If not, downloads models.zip from the configured GitHub Release URL
  3. Extracts the zip and removes the archive
  4. 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

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)

Source distribution for vntts 0.1.5
File Size Uploaded
vntts-0.1.5.tar.gz 13.9 kB Details

Built distribution (wheel)

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

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

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files

0.1.4

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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