donglao-tts
Reference-voice text-to-speech with a simple Python API.
Research/pre-1.0 release. APIs may change between versions. Use reference voices only with the speaker's permission.
Recommended Python API
uv add donglao-tts
# Or with pip
python -m pip install donglao-tts
from donglao_tts import DongLaoTTS
tts = DongLaoTTS.from_pretrained("DongLao/DongLao-TTS")
waveform = tts.generate(
"Xin chào mọi người, đây là Đông Lào TTS.",
reference_audio="reference.wav",
reference_text="Exact transcript of the speech in reference.wav.",
output_path="output.wav",
)
print(tts.revision)
print(tts.sample_rate)
print(tuple(waveform.shape))
The first call downloads the model, tokenizer, and bundled MOSS codec. CUDA is selected when
available; otherwise the model runs on CPU. Reuse the loaded tts object for subsequent calls.
For reproducible use, pin a tested model commit:
tts = DongLaoTTS.from_pretrained(
"DongLao/DongLao-TTS",
revision="6ba3003ccb8d938c2a725a4117084492909c9419",
device="cuda",
)
Generation controls are available when needed:
waveform = tts.generate(
"Text to synthesize.",
reference_audio="reference.wav",
reference_text="Exact reference transcript.",
output_path="output.wav", # optional
max_frames=200,
temperature=1.0,
top_k=0,
)
The returned waveform is a CPU PyTorch tensor with shape [channels, samples].
Runtime requirements
- Python
>=3.10,<3.11 - Linux x86-64
- PyTorch and TorchAudio
>=2.8.0,<3 - CUDA-capable GPU recommended; CPU inference is supported
Reference audio
Use a clean, consented recording containing one speaker. reference_text must match the spoken
content exactly. Avoid music, overlapping speakers, clipping, long silence, and heavy reverb.
Verify the installation
donglao-smoke-test-hub \
--repo-id DongLao/DongLao-TTS \
--device cpu
For an end-to-end test, also pass --ref-audio, --ref-text, --target-text, and --output.
Responsible use
Obtain consent before using a voice, disclose synthetic audio when appropriate, and protect reference recordings and transcripts. Do not use the package for impersonation, fraud, harassment, or bypassing voice authentication.
Links
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file donglao_tts-0.1.5.tar.gz.
File metadata
- Download URL: donglao_tts-0.1.5.tar.gz
- Upload date:
- Size: 409.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e7bfa1ef49d034c98af6af6ea09783c29183c6750e1ad26d4217d64f14f11e63
|
|
| MD5 |
3f2b3dab63e39fbd587571c9a8fd84b0
|
|
| BLAKE2b-256 |
18860bfd1e9393b5a18a1a0a0f81fbc8937cd581910bd3ada34ee8cf4d1590fa
|
Provenance
The following attestation bundles were made for donglao_tts-0.1.5.tar.gz:
Publisher:
release.yml on DongLaoAI/donglao-tts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
donglao_tts-0.1.5.tar.gz -
Subject digest:
e7bfa1ef49d034c98af6af6ea09783c29183c6750e1ad26d4217d64f14f11e63 - Sigstore transparency entry: 2304916612
- Sigstore integration time:
-
Permalink:
DongLaoAI/donglao-tts@4323b200fa552a529040c14bf2744c16ea7443fb -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/DongLaoAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4323b200fa552a529040c14bf2744c16ea7443fb -
Trigger Event:
push
-
Statement type:
File details
Details for the file donglao_tts-0.1.5-py3-none-any.whl.
File metadata
- Download URL: donglao_tts-0.1.5-py3-none-any.whl
- Upload date:
- Size: 76.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
340bfd1d6eb424fd363ef4c5b35e9f5cf9bfbcdc6651a977e4f91547186030a0
|
|
| MD5 |
61066d4b1b04dfe3a9079ffef9dbe2cf
|
|
| BLAKE2b-256 |
ba3b7f4cd1ac602a214839bf5382b1190eaeca902b81b7612333b6faa63e2c4f
|
Provenance
The following attestation bundles were made for donglao_tts-0.1.5-py3-none-any.whl:
Publisher:
release.yml on DongLaoAI/donglao-tts
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
donglao_tts-0.1.5-py3-none-any.whl -
Subject digest:
340bfd1d6eb424fd363ef4c5b35e9f5cf9bfbcdc6651a977e4f91547186030a0 - Sigstore transparency entry: 2304916631
- Sigstore integration time:
-
Permalink:
DongLaoAI/donglao-tts@4323b200fa552a529040c14bf2744c16ea7443fb -
Branch / Tag:
refs/tags/v0.1.5 - Owner: https://github.com/DongLaoAI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@4323b200fa552a529040c14bf2744c16ea7443fb -
Trigger Event:
push
-
Statement type: