toolnet-tts
Client Python và Node.js gửi văn bản đến máy chủ ToolNet TTS để tạo WAV bằng giọng Thiện Minh của VieNeu v3 Turbo. Client không tải model; máy chủ cần cài model và các phụ thuộc riêng. Cần có URL máy chủ để sử dụng.
Python
pip install toolnet-tts
export TOOLNET_TTS_SERVER="https://your-server.example"
# Nếu máy chủ yêu cầu khóa:
export TOOLNET_TTS_API_KEY="your-api-key"
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")
Có thể đặt URL bằng server="https://your-server.example". Chỉ hỗ trợ WAV; hiện không hỗ trợ MP3, word boundaries hoặc phát trực tiếp.
Node.js
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
import { Communicate } from 'toolnet-tts';
await new Communicate('Xin chào các bạn').save('hello.wav');
Chạy máy chủ riêng
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
Đặt TOOLNET_TTS_DEVICE=cpu để chạy CPU. Với CPU hỗ trợ VNNI, có thể thử export TOOLNET_TTS_PRECISION=int8 để dùng model ONNX INT8 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 này không áp dụng cho GPU. Lần đầu cần tải model VieNeu; nếu dùng GPU cần thêm các phụ thuộc CUDA tương thích. /health báo tiến trình và trạng thái nạp model; POST /v1/speech nhận JSON {"text":"...","voice":"Thiện Minh"} và trả WAV. Đặt TOOLNET_TTS_API_KEY ở cả client và server để xác thực Bearer. Nếu mở máy chủ cho client ở xa, cần cấu hình HTTPS và mạng phù hợp; lệnh trên chỉ lắng nghe tại localhost.
Giọng và model: VieNeu-TTS v3 Turbo, Apache-2.0. Dự án này sử dụng model gốc; không đưa checkpoint Piper thử nghiệm vào gói client.
Chạy cục bộ kiểu cũ
from toolnet import TTS vẫn có thể dùng sau khi cài toolnet-tts[server]. API này tải và chạy VieNeu trên chính máy gọi, không dùng máy chủ.
Metadata
Release files for toolnet-tts 0.2.1
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.2.1.tar.gz | 8.7 kB | With provenance | Details for toolnet_tts-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| toolnet_tts-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for toolnet_tts-0.2.1-py3-none-any.whl |
Total release size: 16.0 kB
Release files / toolnet_tts-0.2.1.tar.gz
| Download URL | toolnet_tts-0.2.1.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb6b5a5712b4c08c2ac0e950dffc5637cab502445195711d328400272a090c3e
|
|
BLAKE2b-256 checksum How to use checksums |
0f214289bfc76346dd7ea1cf7c747cc8e2cfbe8b9b3e23459c199cd3b43f37f6
|
| 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.2.1-py3-none-any.whl
| Download URL | toolnet_tts-0.2.1-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
beea4c10d98949d70bd7553da0dbefe15e266d5a6bc0db1353adb3a199576d4a
|
|
BLAKE2b-256 checksum How to use checksums |
b2a550c9024b27ae92fc2140bc52d9bea5524e04a97305980981029d7f4591b4
|
| 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.2.1
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.2.1.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.