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

Weights published — CER 11.82% / tone accuracy 84.22% / code-switch CER 13.87% on a 100-sentence gate set (N=5 repeat eval). Single default voice only — no voice cloning, no voice selection (yet). PyPI package not published yet — install from source for now; see the GitHub repo for current status.


Install

git clone https://github.com/typangaa/canto-tts.git && cd canto-tts && pip install -e .

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.0.tar.gz (55.5 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.0-py3-none-any.whl (55.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: canto_tts-0.1.0.tar.gz
  • Upload date:
  • Size: 55.5 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.0.tar.gz
Algorithm Hash digest
SHA256 dc353e61d50f60727184dde9346a48148aa52a4ec610cd4dd71149e23ab02782
MD5 c7e4aba66e1dd9defc43c05d9c2ff352
BLAKE2b-256 620ac79db1d5da0f61b1943ac3b6b3abaebc5e5b37bbd3b2c9bc193017c0db18

See more details on using hashes here.

Provenance

The following attestation bundles were made for canto_tts-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: canto_tts-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 55.1 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aac01de3c176c54472b11c69ef378b361a254947ae8a804586197a97a6c812dc
MD5 93f86154bad4409f2cf6c03d0707a1b6
BLAKE2b-256 34fa5c04e3936a4b7cfe5874eeb832f3d95c8ad299256ad36404f39e8f5463c3

See more details on using hashes here.

Provenance

The following attestation bundles were made for canto_tts-0.1.0-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

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

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