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.2.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.2-py3-none-any.whl (55.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: canto_tts-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 a9f80d998ed0735204bdeba4fd42979b0312726f6c6ca8b3f6b678d13430ff4b
MD5 5d14bec96de67c5944f41c1232cd08c2
BLAKE2b-256 4d332df1cafe0964939554cfe66fac6c6a1fd4bb7eaa40f6e47084427192dc88

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: canto_tts-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 df305b7a34546afbc5dca01926088e5df4fe3bfe3a9c9f818cda0bbcfc7993ec
MD5 ef4564a864adc631ffa0c7b211c3f86a
BLAKE2b-256 860f95e36349bacce3aed3927a87226a0388cf6ecd034c8c8fc351f38d0835dc

See more details on using hashes here.

Provenance

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

This release

0.1.2 This release

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