Canturía
Words into a song, rendered by your own ACE-Step server.
Canturía is a small, privacy-first text-to-song tool. Type what the song is about, or paste your own lyrics, choose a genre and a length, and get an MP3 back. It is the same shape as Limn, but for music: a Python library and CLI, a single-page web UI, and a Tauri desktop app.
No account, no telemetry, no hosted service. Nothing leaves your box except the request to the ACE-Step server you configure and the local Ollama call that writes lyrics.
Download the desktop app: https://michael-borck.github.io/canturia/ — direct links for macOS Apple Silicon, macOS Intel, Windows, and Linux.
"What's the song about?" ──► Ollama writes lyrics ──► ACE-Step sings
"Write your own lyrics" ───────────────────────────► ACE-Step sings
"Surprise me" ──────────────────────────────────────► ACE-Step invents
Three ways in
- About a topic (default) — type a theme or a sentence. Canturía asks Ollama on this machine for original lyrics, then sends them to ACE-Step with your genre, exact length, and English vocals.
- Write lyrics — paste your own words, with
[Verse]/[Chorus]tags for structure. Your words go straight to ACE-Step; length is honoured exactly. - Surprise me — the raw ACE-Step
sample_querypath. Experimental: the 5Hz LM is a music planner, not a lyricist, so length and language can wander. Use it for a happy accident.
The topic path can use one of three lyricists:
- Ollama — local, no key, the default.
- OpenAI-compatible — bring your own key: OpenAI, LM Studio, llama.cpp,
OpenRouter, or any
/v1/chat/completionsendpoint. - ACE-Step LM — experimental, for comparison; it often returns
[Instrumental].
The web UI has a Preview lyrics button: write the words first, edit them,
then Sing these lyrics with an exact length. The CLI equivalents are
canturia lyrics and canturia compare.
All paths take a genre chip or free-text genre, optional style details, and a length from 10 to 600 seconds (30/45/60 are the fast presets).
Install
pip install "canturia[serve]"
ollama pull qwen3.5:4b # or another chat model; set ollama.model if needed
For development:
uv sync --all-groups
uv run canturia --help
Ollama runs locally. If it is not running, the Write lyrics path still works; the About a topic path explains what is missing.
Configure
Canturía reads ~/.canturia.yaml, then ./canturia.yaml, then CLI flags.
Write a template and edit it once:
canturia --init-config
base_url: http://192.168.20.120:8002
# Optional upstream auth (Bearer or HTTP Basic):
# api_key: "${ACESTEP_API_KEY}"
# username: admin
# password: "${ACESTEP_PASSWORD}"
timeout: 900 # cold start can take minutes
poll_interval: 2
genre: folk
duration: 30
# Who writes the lyrics: ollama | openai-compatible | acestep
lyricist: ollama
lyricists:
ollama:
base_url: http://127.0.0.1:11434
model: qwen3.5:4b # empty = auto-pick from /api/tags
timeout: 90
# Bring your own key. Works with OpenAI, LM Studio, llama.cpp, OpenRouter, …
openai-compatible:
base_url: https://api.openai.com/v1
model: gpt-4o-mini
api_key: "${OPENAI_API_KEY}"
timeout: 90
# ACE-Step's own LM, for comparison only; often returns [Instrumental].
# acestep: {}
vocal_language: en
thinking: true # better audio/metadata; resident: true on the server
serve:
host: 127.0.0.1
port: 2268
# password: "${CANTURIA_SERVE_PASSWORD}"
out_dir: ~/Music/Canturia
Secrets can be referenced as ${VAR} so no plaintext keys live in the file.
Environment overrides include CANTURIA_BASE_URL, CANTURIA_API_KEY,
CANTURIA_USERNAME, CANTURIA_PASSWORD, CANTURIA_LYRICIST,
CANTURIA_OLLAMA_URL, CANTURIA_OLLAMA_MODEL, CANTURIA_OPENAI_BASE_URL,
CANTURIA_OPENAI_MODEL, CANTURIA_OPENAI_API_KEY,
CANTURIA_SERVE_PASSWORD, and CANTURIA_OUT_DIR.
CLI
# Topic mode: the chosen lyricist writes, then ACE-Step sings
canturia topic "a warm song about growing up by the sea" -g folk -t 30
canturia topic "a warm song about growing up by the sea" -g folk -t 30 \
--lyricist openai-compatible
# Lyrics only, no audio
canturia lyrics "a birthday song for grandma" -g folk -t 30 --lyricist ollama
# Compare lyricists side by side
canturia compare "a birthday song for grandma" -g folk -t 30 \
--with ollama --with acestep
# Your own lyrics (the default command)
canturia "[Verse]\nMorning light across the floor\n[Chorus]\nGrow a little every day" \
-g folk -t 30 -o morning.mp3
# Raw ACE-Step describe path (experimental)
canturia describe "a surprising song about a robot who learns to dance" -g pop -t 30
# Read lyrics from a file ('-' for stdin)
canturia --lyrics-file words.txt -g indie -t 60
# Check ACE-Step and Ollama
canturia health
# Web UI
canturia serve
Every saved song gets a <song>.json sidecar with the mode, lyrics writer,
genre, style, prompt, lyrics, duration, vocal language, and server metadata.
Optional depth
The main screen stays simple; an Options disclosure adds:
- Instrumental (skips lyrics)
- Vocal language
- BPM, key, and time signature
- Seed
- DiT model
- Inference steps and guidance scale
- Server-side LoRA: load, use/bypass, scale, unload
canturia topic "a rainy street" --instrumental --language es --bpm 90 \
--key "C major" --time-signature 4/4 --seed 42 --steps 20 --guidance 6.5
canturia lora status
canturia lora load /app/loras/my-adapter --name my-adapter
canturia lora scale 0.7
canturia lora off
canturia lora unload
LoRA is a server-side adapter; the path must exist on the ACE-Step host.
Web UI
canturia serve --password "something" --host 0.0.0.0
The page has About a topic and Write lyrics tabs, a lyricist selector,
a Preview lyrics panel (edit before singing), a Surprise me button,
genre chips, 30/45/60 s presets plus a custom field, style details, an
Options panel for advanced controls and LoRA, a Help sheet, and inline
hints. Songs appear in a session gallery with an audio player,
Save, Download, Again, and Delete. The session gallery is in memory only; Save
writes into ~/Music/Canturia (or serve.out_dir).
Below it, Saved songs lists the files in that folder with play, download,
lyrics, and delete actions. canturia library lists the same songs from the
CLI, and the desktop app has an Open folder button.
When serve binds beyond localhost without a password, it generates one and
prints it. The upstream ACE-Step credentials are separate: use api_key for a
Bearer token or username/password for HTTP Basic at a reverse proxy.
The 5Hz LM and the topic path
ACEStep's describe/sample_query mode is a chaos knob: the same one-liner can
return a different duration and language (144 s Vietnamese, then 184 s Danish
in one test). That is why the topic box does not use it. Ollama writes the
lyrics first, and ACE-Step receives explicit lyrics, audio_duration,
vocal_language: en, and thinking: true. A 30 s request came back at exactly
30.000 s.
For the raw Surprise me path, Canturía appends "with lyrics in English and English vocals, about N seconds long" to the description, because putting the language in the words is the only lever that moved the 5Hz LM in testing. It is still best-effort: the same prompt produced Vietnamese, Danish, Swedish, and English across four runs, and 30–45 s requests came back at 144–188 s. Treat Surprise as a novelty, not a contract.
resident: true still earns its VRAM: thinking: true improves audio and
metadata backfill, the raw Surprise path stays available, and the ACE-Step LM
can be selected as an experimental lyricist for comparison. The default topic
path never uses it to write lyrics.
ACE-Step notes
- The API is asynchronous:
POST /release_task, pollPOST /query_result, then downloadGET /v1/audio?path=.... query_resultnests a JSON string insidedata[0].result; Canturía decodes it to find the generated file path.- The finished
fileis a ready-made relative URL, not a raw path; the client accepts both. - Canturía always sends
batch_size: 1, so one Generate makes one song. - The first cold request can load/download ~8 GB of weights. The default timeout is 15 minutes; raise it if your first run is slower.
- The server runs either the Gradio UI or the API, not both. This client needs the API mode.
Desktop
The Tauri v2 shell lives in desktop/. It bootstraps a private Python runtime
with uv, runs canturia serve on a random localhost port, and shows the web
UI in the window. Settings writes ~/.canturia.yaml.
cargo install tauri-cli --locked
cd desktop && cargo tauri dev
The sidecar installs canturia[serve]==0.4.0 from PyPI. For local Python
changes, set CANTURIA_DEV_PATH="$PWD" to install the repo in editable mode
instead.
Why Python, and why Tauri
Python is the core because the same code is the PyPI library, the CLI, and the
local server the desktop app runs. Tauri wraps that server with the OS webview,
so there is no bundled browser engine; Electron would only add weight. The
desktop app bootstraps a private runtime with uv, exactly like Limn, rather
than shipping a 1 GB Python bundle.
Development
On this machine the repo is on an exFAT drive, so keep the venv on the internal disk (the same workaround Limn uses):
export UV_PROJECT_ENVIRONMENT="$HOME/.venvs/canturia"
uv sync --all-groups
uv run --no-sync ruff check src tests
uv run --no-sync basedpyright
uv run --no-sync pytest
Roadmap
- M1 — Python core, CLI, web UI (done).
- M2 — Tauri desktop shell with a Settings sheet for the server URL, credentials, and lyricist/BYOK, uv-bootstrapped sidecar, installers in CI (done; PyPI 0.4.0).
- M3 — Optional advanced controls, documented but hidden by default: BPM, key, time signature, instrumental, vocal language, LoRA selection.
Name
Canturía (Spanish): the act or manner of singing — "esta composición tiene
buena canturía." Package and CLI: canturia.
License
MIT.
Metadata
Release files for canturia 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| canturia-0.4.0.tar.gz | 254.0 kB | Without provenance | Details for canturia-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| canturia-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for canturia-0.4.0-py3-none-any.whl |
Total release size: 314.2 kB
Release files / canturia-0.4.0.tar.gz
| Download URL | canturia-0.4.0.tar.gz |
|---|---|
| Size | 254.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
77bd8bea663b1c18ecd0f8a349912fe0b35c4e05f2f1646d891423ef42d7089a
|
|
BLAKE2b-256 checksum How to use checksums |
17fc38e214bf7c86466f68320b3299cd1260dca12c00cb777a4d3c6acd3f1051
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|
Release files / canturia-0.4.0-py3-none-any.whl
| Download URL | canturia-0.4.0-py3-none-any.whl |
|---|---|
| Size | 60.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1cc4b43bd655203aaab2603059744783d48ca3e4057f0246ce08831c044202bc
|
|
BLAKE2b-256 checksum How to use checksums |
e56a19090cb56545d9d3f8d79c92d853304a0126ef02e8997ce6be1207cdcd77
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|
Security for canturia 0.4.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.