← Back to the collection

Ollama Talk

Local text-to-speech through Ollama’s Phonon model. The bundled phonon.py does everything through the Ollama API: it finds the installed Phonon tag, checks the voice is really in that tag, generates the WAV, applies speed with ffmpeg, and plays or saves.

Codex: this path resolves under Claude Code; substitute the directory containing this SKILL.md.

SKILL_DIR="${CLAUDE_SKILL_DIR}"
python3 "$SKILL_DIR/scripts/phonon.py" doctor

Run doctor once per session before the first say. Exit 2 means Ollama or the model is missing; relay the message’s fix (ollama pull phonon, start Ollama) to the user rather than working around it.

1. Pick the voice

Split the request into structured filters and a vibe. Gender and accent go to flags; words like “cheery”, “calm”, “gravelly” you judge yourself from the descriptions.

Codex: this path resolves under Claude Code; substitute the directory containing this SKILL.md.

SKILL_DIR="${CLAUDE_SKILL_DIR}"
python3 "$SKILL_DIR/scripts/phonon.py" voices --gender female --locale british

--locale takes en-gb, en-us, en (both), fr-fr, de-de, es-es, es-mx, pt-br, characters, or plain words (british, american, mexican, …). The list only contains voices the installed tag actually has, joined to the bundled Gradium voice catalog; --all shows the whole catalog and flags voices this tag lacks. Never pass a voice that is not in the plain (non---all) list.

Choose the one voice whose description best fits the vibe, and tell the user which voice you picked and why in a few words. If nothing fits well, say so and name the closest. The English tag also carries character voices (--locale characters: “Captain Silas Blackwater”, “The Snow Queen”, …) for storytelling requests; they have no gender or age in the catalog, so a --gender filter drops them. Names can contain spaces, so always quote --voice.

No voice asked for → default.

2. Speak

Codex: this path resolves under Claude Code; substitute the directory containing this SKILL.md.

SKILL_DIR="${CLAUDE_SKILL_DIR}"
python3 "$SKILL_DIR/scripts/phonon.py" say --voice "Maeve" --speed 1.25 "Text to read."

say prints one JSON line (path, tag, voice, speed, duration_seconds). Report the voice and the path; don’t paste the JSON.

Exit codes

1 usage/runtime error · 2 Ollama or model unavailable · 3 voice not in the tag (message suggests close names) · 4 ffmpeg or afplay missing (brew install ffmpeg; afplay is macOS-only, so use --out elsewhere).