Skip to main content

Vietnamese Text-to-Speech and Speech-to-Text library with embedded models

Project description

VNTTS

Dự án tích hợp Vietnamese Text-to-Speech (TTS)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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vntts-0.1.4.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vntts-0.1.4-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file vntts-0.1.4.tar.gz.

File metadata

  • Download URL: vntts-0.1.4.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vntts-0.1.4.tar.gz
Algorithm Hash digest
SHA256 b12f4f724283b2b099ca37c4741c6edad58e11e7089a7f0570a55070387b49ab
MD5 f773bb8c11888ebd53f7c7cf18f55009
BLAKE2b-256 d12284b1505f1a566d8ab327ef6d84142edb09a73c501d41cefca5ce0f3f5e41

See more details on using hashes here.

File details

Details for the file vntts-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: vntts-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vntts-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 876db36b3eb1662dd4b698daaad73ddf41a33c887ea48b6f5a54cd8af13dc441
MD5 6f8aec0f82ee0c2a254b0bd9973a95a2
BLAKE2b-256 12a80e7d78df7a28bbb7e048e6ff224c431160c7e5696d1160028681537c7429

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page