Pronounce Button logo

Pronounce Button

Community
dmccreary
pronounce-button

Generate an MP3 pronunciation of a glossary term using ElevenLabs TTS API and insert a "Pronounce" button into the term's entry in a markdown file. Trigger when the user says "Create a pronounce button for the term X" or "Add pronunciation for X". Defaults to glossary.md if no file is specified.

Overview

Publisherdmccreary
Repositoryibook-skills
Skill namepronounce-button
Stars
109
Forks
21
Bundled files
1
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by dmccreary on GitHub. Read the source before you install it.

Installation

Install the Pronounce Button AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/dmccreary/ibook-skills/tree/main/skills/archived/pronounce-button
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/dmccreary/ibook-skills.git /tmp/ibook-skills
mkdir -p .claude/skills
cp -r /tmp/ibook-skills/skills/archived/pronounce-button .claude/skills/pronounce-button
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Pronounce Button in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Pronounce Button on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Pronounce Button is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Pronounce Button Skill

Add an inline audio "Pronounce" button to a glossary term or any term heading in a markdown file, powered by ElevenLabs text-to-speech.

When to Use

Trigger this skill when the user asks to:

  • "Create a pronounce button for the term 'Bryophytes'"
  • "Create a pronounce button for the term 'Bryophytes' in glossary.md"
  • "Add pronunciation for 'Sphagnum Moss'"
  • "Add a pronounce button for X in chapter-03.md"

Prerequisites

  • The environment variable ELEVENLABS_API_KEY must be set. Never hard-code or commit this key.
  • The ElevenLabs API reference repo is at /Users/dan/Documents/ws/elevenlabs-skills for additional documentation if needed.

Workflow

Step 1: Identify the Term and Target File

Parse the user's request to extract:

  1. Term — the word or phrase to pronounce (e.g., "Bryophytes")
  2. Target file — the markdown file containing the term (default: docs/glossary.md)

Step 2: Generate the MP3

Important: Try the plain word first. ElevenLabs handles most scientific terms correctly when given the actual word. Only fall back to phonetic spelling if the plain word sounds wrong after listening to it.

Three-tier approach (escalate only when the user reports a problem):

  1. Tier 1 — Plain word (default). Send the actual term (e.g., "Biogeography"). This works for most words. Always try this first.

  2. Tier 2 — Hyphenated phonetic (fallback). If the user says the plain word sounds wrong, regenerate using a hyphenated phonetic version (e.g., "Gah-mee-toh-fyte"). This can backfire — ElevenLabs sometimes reads each syllable as a separate word — so only use when Tier 1 fails.

  3. Tier 3 — SSML with CMU Arpabet (last resort). If both plain and phonetic versions fail, use the --ssml flag with a CMU Arpabet string. This switches to eleven_flash_v2 which supports SSML <phoneme> tags for precise phoneme-level control. Only use when the user explicitly indicates that Tiers 1 and 2 both failed.

Tier 1 — Plain word:

bash
python3 SCRIPT "Biogeography" --output docs/audio/biogeography.mp3

Tier 2 — Phonetic fallback:

bash
python3 SCRIPT "Gah-mee-toh-fyte" --output docs/audio/gametophyte.mp3

Tier 3 — SSML (last resort):

bash
python3 SCRIPT "evapotranspiration" \
    --ssml "IH0 V AE2 P OW0 T R AE2 N S P ER0 EY1 SH AH0 N" \
    --output docs/audio/evapotranspiration.mp3

The --ssml flag takes a CMU Arpabet phoneme string. Stress markers are required: 1 = primary stress, 2 = secondary stress, 0 = no stress. See CMU Arpabet reference for the full phoneme set.

Known terms that required SSML (user-verified):

TermCMU Arpabet
AcrocarpousAE2 K R OW0 K AA1 R P AH0 S
EvapotranspirationIH0 V AE2 P OW0 T R AE2 N S P ER0 EY1 SH AH0 N

Where SCRIPT is:

python3 /Users/dan/.claude/skills/pronounce-button/scripts/generate-pronunciation.py

Where SLUG is the term lowercased with spaces replaced by hyphens (e.g., "Sphagnum Moss" → sphagnum-moss).

The script:

  • Reads ELEVENLABS_API_KEY from the environment
  • Calls the ElevenLabs v1 TTS endpoint with the eleven_multilingual_v2 model
  • Writes an MP3 file to docs/audio/SLUG.mp3
  • Uses the "Sarah" voice by default (clear US female voice suitable for term pronunciation)

If the API call fails, report the error to the user. Common issues:

  • 401: Invalid API key — ask the user to check ELEVENLABS_API_KEY
  • 429: Rate limit — wait and retry

Step 3: Insert the Pronounce Button

Locate the term heading in the target markdown file. The heading format is typically #### Term Name in the glossary, but may be other heading levels in chapter files.

Insert the pronounce button HTML immediately after the heading line, before the definition text. Use this exact HTML pattern:

html
<audio id="audio-SLUG" src="../audio/SLUG.mp3" preload="none"></audio>
<button onclick="document.getElementById('audio-SLUG').play()" class="pronounce-btn">🔊 Pronounce</button> *PHONETIC-GUIDE*

The phonetic guide uses italics with the stressed syllable in ALL CAPS (e.g., *gah-MEE-toh-fyte*). Always include this next to the button so users can verify the pronunciation visually.

Adjust the relative path (src attribute) based on the target file's location relative to docs/audio/. MkDocs uses directory URLs by default, so each page is served from a subdirectory (e.g., glossary.md becomes glossary/index.html). Count directory levels from the page's served URL back to the site root, then append audio/SLUG.mp3. For example:

Target fileServed URL pathRelative path
docs/glossary.md/glossary/../audio/SLUG.mp3
docs/appendices/common-terms.md/appendices/common-terms/../../audio/SLUG.mp3
docs/chapters/03-what-is-moss/index.md/chapters/03-what-is-moss/../../audio/SLUG.mp3

Example result in glossary.md:

markdown
#### Bryophytes

<audio id="audio-bryophytes" src="../audio/bryophytes.mp3" preload="none"></audio>
<button onclick="document.getElementById('audio-bryophytes').play()" class="pronounce-btn">🔊 Pronounce</button> *BRY-oh-fytes*

A division of non-vascular land plants that includes mosses, liverworts,
and hornworts, all of which reproduce via spores and lack true roots,
stems, or leaves.

Step 4: Ensure CSS Exists

Check if docs/stylesheets/extra.css (or whatever custom CSS file is referenced in mkdocs.yml) contains a .pronounce-btn style. If not, append the following:

css
/* Pronounce button for glossary terms */
.pronounce-btn {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 0.85em;
    cursor: pointer;
    margin-bottom: 8px;
    display: inline-block;
}
.pronounce-btn:hover {
    background: #c8e6c9;
}

Step 5: Confirm to User

Report success with the local preview URL:

Generated pronunciation for "Bryophytes" → docs/audio/bryophytes.mp3
Added Pronounce button to docs/glossary.md
Preview: http://127.0.0.1:8000/moss/glossary/#bryophytes

Voice Options

The default voice is Sarah (EXAVITQu4vr4xnSDxMaL) — a clear US female voice well-suited for academic term pronunciation. If the user requests a different voice, pass --voice-id to the script. Common alternatives:

VoiceIDStyle
Sarah (default)EXAVITQu4vr4xnSDxMaLFemale, soft
CharlotteXB0fDUnXU5powFXDhCwaFemale, conversational
GeorgeJBFqnCBsd6RMkjVDRZzbMale, narrative
DanielonwK4e9ZLuTAKqWW03F9Male, authoritative

Batch Mode

To add pronounce buttons for multiple terms at once, the user may say "Add pronounce buttons for all terms in the glossary." In this case:

  1. Read docs/glossary.md and extract all #### headings
  2. For each term, run the script and insert the button
  3. Report the total count when done

Important: Batch mode makes one API call per term. Warn the user about the number of API calls before proceeding (e.g., "This will make 400 API calls to ElevenLabs. Proceed?").

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Pronounce Button AI skill do?

Generate an MP3 pronunciation of a glossary term using ElevenLabs TTS API and insert a "Pronounce" button into the term's entry in a markdown file. Trigger when the user says "Create a pronounce button for the term X" or "Add pronunciation for X". Defaults to glossary.md if no file is specified.

Why use Pronounce Button on TypingMind?

Because you install it once and use it with any model. Pronounce Button is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Pronounce Button in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/dmccreary/ibook-skills/tree/main/skills/archived/pronounce-button. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Pronounce Button?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Pronounce Button?

As many as you like. As long as a model supports skills, you can use Pronounce Button with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Pronounce Button AI skill free?

It is published on GitHub by dmccreary. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇