Skip to main content

canto-tts

Cantonese Hong Kong Text-to-Speech · CPU-first · Apache-2.0

PyPI License Python

An open-source Cantonese (Hong Kong) text-to-speech SDK. Runs on CPU via ONNX Runtime — no GPU required. Fine-tuned from MOSS-TTS-Nano (0.1 B params, GPT-2 backbone, Apache-2.0, by OpenMOSS).

Published — CER 11.82% / tone accuracy 84.22% / code-switch CER 13.87% on a 100-sentence gate set (N=5 repeat eval). Weights on HuggingFace. Single default voice only — no voice cloning, no voice selection (yet).


Install

pip install canto-tts

Quickstart

from canto_tts import CantoTTS

tts = CantoTTS()  # auto-downloads typangaa/canto-tts-nano from HuggingFace on first use
tts.synthesize("多謝晒,今日天氣幾好。", "hello.wav")
print("Saved to hello.wav")

# English code-switching works too
tts.synthesize("我哋一齊去 IFC food court 食飯。", "codeswitching.wav")

Weights auto-download from HuggingFace and cache via the Hub (~/.cache/huggingface/hub/).

Quality Modes (opt-in)

Two opt-in quality= modes trade extra compute for a more reliable draw, without touching the model:

tts.synthesize(text, "out.wav", quality="duration_filter", max_attempts=3)   # no extra deps
tts.synthesize(text, "out.wav", quality="best_of_n", best_of_n=4)            # needs canto-tts[quality]

quality="best_of_n" reranks N draws by ASR character-error-rate; pass asr_backend="sensevoice" (needs canto-tts[quality-sensevoice]) for ~7x faster reranking at a small accuracy cost. Full writeup: GitHub README.

Limitations

Quality CER 11.82% / tone accuracy 84.22% / code-switch CER 13.87% (N=5 repeat, 100-sentence gate set).
Voice Single default voice. No voice cloning, no voice selection (yet).
Language Cantonese (Hong Kong) + English code-switching only. No Mandarin.
Training data Privately sourced — not released (copyright), regardless of weight status.
Weights ✅ Published — huggingface.co/typangaa/canto-tts-nano.

Model & License

Full Documentation

Full README, CLI docs, Docker self-hosting, and deployment guide: https://github.com/typangaa/canto-tts

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

canto_tts-0.1.3.tar.gz (55.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

canto_tts-0.1.3-py3-none-any.whl (55.0 kB view details)

Uploaded Python 3

File details

Details for the file canto_tts-0.1.3.tar.gz.

File metadata

  • Download URL: canto_tts-0.1.3.tar.gz
  • Upload date:
  • Size: 55.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for canto_tts-0.1.3.tar.gz
Algorithm Hash digest
SHA256 71a8825f4a7aeb574beca29e6e18da823f378e8a352d2a2d08d6d91635e04203
MD5 3b7faf39a823687174cbfca131cf25e7
BLAKE2b-256 60d16182886f02127f42d41763b495523becaf37a7fcbb87492106bd512611b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for canto_tts-0.1.3.tar.gz:

Publisher: publish.yml on typangaa/canto-tts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file canto_tts-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: canto_tts-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 55.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for canto_tts-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 430a91bc13f76301f530d21a98c185ee3f84953d8f0fc00f0b0453a754840e30
MD5 fc4e04927ad96bc66ec9fc5f68b288d3
BLAKE2b-256 96c5e443197741d2bba2fc6755e01bc48c0dd15d9e13976110ed70810d837b77

See more details on using hashes here.

Provenance

The following attestation bundles were made for canto_tts-0.1.3-py3-none-any.whl:

Publisher: publish.yml on typangaa/canto-tts

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.1.4

2 files

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page