toolnet-tts
Thư viện Python chuyển văn bản thành giọng Thiện Minh của VieNeu v3 Turbo. Mặc định model chạy cục bộ trên máy; lần đầu sẽ tải model về cache. Có thể tùy chọn sử dụng máy chủ ToolNet từ xa.
Python
Cần Python 3.10 trở lên.
pip install toolnet-tts
toolnet-tts --text "Xin chào các bạn" --write-media hello.wav
import asyncio
from toolnet_tts import Communicate
asyncio.run(Communicate("Xin chào các bạn").save("hello.wav"))
# Hoặc đồng bộ:
Communicate("Xin chào").save_sync("hello.wav")
Model được nạp một lần và dùng lại trong cùng một tiến trình. Cài đặt này tải các phụ thuộc VieNeu và ONNX Runtime; bản thân model được tải ở lần chạy đầu. Cần CPU và RAM đủ cho model; không bắt buộc GPU.
Đặt TOOLNET_TTS_DEVICE=cpu để dùng CPU. Với CPU hỗ trợ VNNI, có thể thử TOOLNET_TTS_PRECISION=int8 để dùng graph ONNX nhỏ hơn; FP32 là mặc định. Hãy kiểm nghe trên phần cứng thực tế vì INT8 có thể giảm chất lượng hoặc không phù hợp CPU cũ. Tùy chọn INT8 chỉ áp dụng cho CPU.
Chỉ hỗ trợ đầu ra WAV; chưa hỗ trợ MP3, word boundaries hoặc phát trực tiếp.
Máy chủ tùy chọn
Trên máy chạy model:
pip install 'toolnet-tts[server]'
export TOOLNET_TTS_API_KEY="replace-with-a-long-random-key"
uvicorn toolnet_tts.server:app --host 127.0.0.1 --port 8000
Trên máy client Python, cài toolnet-tts như trên, rồi chỉ định server:
export TOOLNET_TTS_SERVER="https://your-server.example"
export TOOLNET_TTS_API_KEY="your-api-key"
toolnet-tts --text "Xin chào" --write-media hello.wav
Hoặc truyền server="https://your-server.example" cho Communicate. Máy chủ hỗ trợ /health và POST /v1/speech; nếu cung cấp cho máy khác, cần cấu hình HTTPS và mạng phù hợp. Khi đặt khóa, server yêu cầu Bearer token.
Node.js
Gói npm hiện là client cho máy chủ, cần URL server; nó không tự chạy model:
npm install toolnet-tts
export TOOLNET_TTS_SERVER="https://your-server.example"
npx toolnet-tts --text "Xin chào các bạn" --write-media hello.wav
Giọng và model: VieNeu-TTS v3 Turbo, Apache-2.0. API cũ from toolnet import TTS vẫn được hỗ trợ.
Metadata
Release files for toolnet-tts 0.3.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 |
|---|---|---|---|---|
| toolnet_tts-0.3.0.tar.gz | 8.9 kB | With provenance | Details for toolnet_tts-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| toolnet_tts-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for toolnet_tts-0.3.0-py3-none-any.whl |
Total release size: 16.3 kB
Release files / toolnet_tts-0.3.0.tar.gz
| Download URL | toolnet_tts-0.3.0.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30f26fdbfb4ceb5c69082fb7207b5abeb01dfd8b0ef8d201ef4e6a6138f65f55
|
|
BLAKE2b-256 checksum How to use checksums |
a22923106c917f8ea59d1a93d6f770edbd50a45ebeaa83f43665ddd7c363044d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logRelease files / toolnet_tts-0.3.0-py3-none-any.whl
| Download URL | toolnet_tts-0.3.0-py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8337692a68fc171399e3c7ceb85aa944c532374161caf33e1a586f54966248ce
|
|
BLAKE2b-256 checksum How to use checksums |
b86d1967f4c1938e940546ee95a8ba33187fc3eb2e8525feca47f5352b060fb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logSecurity for toolnet-tts 0.3.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for toolnet_tts-0.3.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 11, 2026.
Transparency logA 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.