Any2Canto turns text in any language into natural spoken Cantonese using OmniVoice zero-shot voice cloning. Optional LLM translation produces colloquial Cantonese before synthesis; Chinese input is normalized with OpenCC (Simplified β Traditional, Hong Kong glyphs).
s2hk + language detection to avoid unnecessary API calls for written Chinese.| Path | Purpose |
|---|---|
space/ | Gradio app (app.py), bundled omnivoice package, and Hugging Face Space metadata (space/README.md). |
space/requirements.txt | Python dependencies (PyTorch + Gradio stack). |
From the space/ directory:
cd space
pip install -r requirements.txt
Set environment variables as needed:
| Variable | Description |
|---|---|
OMNIVOICE_MODEL | Hugging Face model id or path (default: k2-fsa/OmniVoice). |
OMNIVOICE_DEVICE | Optional override: cuda, mps, or cpu. If unset, uses CUDA when available, else Apple MPS, else CPU. |
LLM_API_KEY | API key for translation; if unset, translation is skipped and you can still use Cantonese / Chinese input. |
LLM_BASE_URL | OpenAI-compatible chat completions URL (default points to a compatible endpoint; override for your provider). |
LLM_MODEL | Model name for translation (default: qwen3.5-flash). |
Run the UI:
python app.py
π‘ Local run: python app.py starts Gradio on localhost (default URL in the terminal). Device is picked automatically (cuda β mps β cpu); on Mac with Apple Silicon, install PyTorch for macOS (do not use the CUDA wheel index in requirements.txtβinstall torch / torchaudio from pytorch.org or pip install torch torchaudio on Mac). On Hugging Face Spaces, spaces provides the GPU decorator; locally the app runs without that package.
The file space/README.md contains the Space configuration front matter (app_file, sdk, etc.). Point your Space repository at space/ as the app root, or sync this subtree to your Space repo.
This repository follows the same license as OmniVoice: Apache License 2.0. The license text is the upstream OmniVoice LICENSE. Redistribution must include that file and NOTICE (third-party and attribution).
10 commits
Python
100.0%
Any2Canto turns text in any language into natural spoken Cantonese using OmniVoice zero-shot voice cloning. Optional LLM translation produces colloquial Cantonese before synthesis; Chinese input is normalized with OpenCC (Simplified β Traditional, Hong Kong glyphs).
s2hk + language detection to avoid unnecessary API calls for written Chinese.| Path | Purpose |
|---|---|
space/ | Gradio app (app.py), bundled omnivoice package, and Hugging Face Space metadata (space/README.md). |
space/requirements.txt | Python dependencies (PyTorch + Gradio stack). |
From the space/ directory:
cd space
pip install -r requirements.txt
Set environment variables as needed:
| Variable | Description |
|---|---|
OMNIVOICE_MODEL | Hugging Face model id or path (default: k2-fsa/OmniVoice). |
OMNIVOICE_DEVICE | Optional override: cuda, mps, or cpu. If unset, uses CUDA when available, else Apple MPS, else CPU. |
LLM_API_KEY | API key for translation; if unset, translation is skipped and you can still use Cantonese / Chinese input. |
LLM_BASE_URL | OpenAI-compatible chat completions URL (default points to a compatible endpoint; override for your provider). |
LLM_MODEL | Model name for translation (default: qwen3.5-flash). |
Run the UI:
python app.py
π‘ Local run: python app.py starts Gradio on localhost (default URL in the terminal). Device is picked automatically (cuda β mps β cpu); on Mac with Apple Silicon, install PyTorch for macOS (do not use the CUDA wheel index in requirements.txtβinstall torch / torchaudio from pytorch.org or pip install torch torchaudio on Mac). On Hugging Face Spaces, spaces provides the GPU decorator; locally the app runs without that package.
The file space/README.md contains the Space configuration front matter (app_file, sdk, etc.). Point your Space repository at space/ as the app root, or sync this subtree to your Space repo.
This repository follows the same license as OmniVoice: Apache License 2.0. The license text is the upstream OmniVoice LICENSE. Redistribution must include that file and NOTICE (third-party and attribution).
10 commits
Python
100.0%