Skip to main content

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. 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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for toolnet-tts 0.2.0
File Size Uploaded Provenance Actions
toolnet_tts-0.2.0.tar.gz 8.2 kB Without provenance Details for toolnet_tts-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for toolnet-tts 0.2.0
File Interpreter ABI Platform Actions
toolnet_tts-0.2.0-py3-none-any.whl Python 3 none any Details for toolnet_tts-0.2.0-py3-none-any.whl

Total release size: 15.3 kB

Release files / toolnet_tts-0.2.0.tar.gz

Download URL toolnet_tts-0.2.0.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
db60ca40032ee5e87cd4f796990660fcff872112b3471919242c095b12b05642
BLAKE2b-256 checksum
How to use checksums
97f68bde5072a0e86a7a93245cb0e86761987b66a2a322eb7cf8c986be499572
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Release files / toolnet_tts-0.2.0-py3-none-any.whl

Download URL toolnet_tts-0.2.0-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a649c6631072448ae2ca3e82e858b20207785fb459962dc192af091d83e1b59
BLAKE2b-256 checksum
How to use checksums
909a7420d5500b341275f28079cf3c224ad892b5b36ed506c19b80bce6560bcb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.16

Security for toolnet-tts 0.2.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

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