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.4.tar.gz (56.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.4-py3-none-any.whl (55.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: canto_tts-0.1.4.tar.gz
  • Upload date:
  • Size: 56.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.4.tar.gz
Algorithm Hash digest
SHA256 5c0aa4d62d279cb8cc666a263d421ef30ded4cb7914dc1fff76c689aeeb78203
MD5 b12e50ad149129d01b669008eeaa0ef2
BLAKE2b-256 7d0723c857425bb24ff53fe485808b48fa3e30f54ddeeddc6258b1a9474543f5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: canto_tts-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 55.9 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8893f6b3bad802199787cf637120d3e49f0c1cd7848a4fd7ce99919a8588c028
MD5 8c46218ceb94cdb31eecb2f834a2e533
BLAKE2b-256 43218e3469cad4618f95979d246f400ae161ddc26b5dcbc46528501173bd9274

See more details on using hashes here.

Provenance

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

This release

0.1.4 This release

2 files

0.1.3

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