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/
  models/
    banmai/
      banmai.part001
      banmai.part002
      ...
      banmai.onnx.json
    asr/
      sherpa-onnx-zipformer-vi-2025-04-20/
        encoder.int8.part001
        decoder.part001
        joiner.int8.part001
        tokens.txt
        ...
  scripts/
    split_model.py
    merge_model.py
  src/vntts/
    tts.py
    stt.py
    model_parts.py
  test/
    pipeline_test.py
  tests/
  README.md

Cài đặt

python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Quản lý model lớn (không dùng Git LFS)

1) Tách model (<= 80MB mỗi part)

python scripts/split_model.py models/banmai/banmai.onnx --chunk-size-mb 80 --write-checksum

Mặc định script tạo theo chuẩn:

  • banmai.part001
  • banmai.part002
  • ...

2) Ghép model thủ công (nếu muốn)

python scripts/merge_model.py models/banmai/banmai.onnx --verify-checksum
# hoặc merge toàn bộ trong 1 thư mục
python scripts/merge_model.py models/asr/sherpa-onnx-zipformer-vi-2025-04-20

Auto-merge khi runtime (không cần user thao tác)

Khi gọi TTS hoặc STT, hệ thống tự động:

  • phát hiện thiếu file .onnx
  • tìm các file .part*
  • ghép lại thành .onnx trước khi inference

Hỗ trợ cả 2 kiểu đặt tên part:

  • banmai.part001 (hoặc banmai.part1) -> banmai.onnx
  • banmai.onnx.part001 (hoặc banmai.onnx.part1) -> banmai.onnx

Chuẩn bị model

TTS Banmai

STT sherpa-onnx

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.0.tar.gz (11.3 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.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vntts-0.1.0.tar.gz
  • Upload date:
  • Size: 11.3 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.0.tar.gz
Algorithm Hash digest
SHA256 d204e0c268177ce792e73fdbae2cf3a7f138cd3a4b0038671e0be7b574fddee7
MD5 faa5bd2c71802986022cc81106201ee4
BLAKE2b-256 3ffd05892915ffdf9bdd0ed383f93a97b924c4bbb127331f559211d129606519

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vntts-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a5a72a2f42c0cd36628401fd2bf2cc98ae899e656a25a85cb5e4c61f6ba0d572
MD5 75668200ff44d7daa26e12e8f72e0c52
BLAKE2b-256 b3f728d6146124f5713771904f02c88c16502d41c085e3da9279b6d235b8a7de

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