Borrowing it
Nothing to install: this file belongs to ayutaz/piper-plus. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ayutaz/piper-plus/dev/.claude/commands/add-language.mdgit clone --depth 1 https://github.com/ayutaz/piper-plusWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/ayutaz/piper-plus/add-language)<a href="https://agentmods.dev/commands/ayutaz/piper-plus/add-language"><img src="https://agentmods.dev/badge/commands/ayutaz/piper-plus/add-language/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/ayutaz/piper-plus/add-language"><img src="https://agentmods.dev/badge/commands/ayutaz/piper-plus/add-language.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.02774 |
| Opus 5.5 | $0.00000 | $0.01110 |
| Sonnet 5.5 | $0.00000 | $0.00555 |
| Haiku 4.5 | $0.00000 | $0.00277 |
Grade A, and why
add-language scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 232 lines — stays where its author put it; the contents beside it link to each section on GitHub.
新言語追加ガイド
新しい言語を piper-plus に追加するためのガイドです。引数 $ARGUMENTS に言語コード (例: de, it, da) を指定してください。
前提条件
- Python テストは
uv run python -m pytestで実行 - 各タスク完了ごとにコミット
- Python が参照実装、他言語は 1:1 ミラー
- eSpeak-ng 不使用 (MIT ライセンス維持)
Phase 1: Python 音素定義 + G2P エンジン
1.1 音素インベントリ + PUA 割り当て
新規作成: src/python/g2p/piper_plus_g2p/$ARGUMENTS.py
from .base import Phonemizer
# Implement the phonemizer class here. Register it in `registry.py`; the
# shared ID map is maintained in `encode/id_maps.py` and PUA data in
# `encode/pua.py` / `data/pua.json`.
修正: src/python/g2p/piper_plus_g2p/encode/pua.py と data/pua.json
FIXED_PUA_MAPPINGに PUA エントリ追加- 現在の最終固定 PUA: PT = 0xE064 (
ɔɪ=0xE062、œ̃=0xE063、ɐ̃=0xE064)、動的割り当て開始 = 0xE065 - 新言語は 0xE065 以降 に割り当て
_PUA_STARTを新言語の最終 PUA + 3 に更新 (将来拡張用)
衝突チェック:
JA: 0xE000-0xE01C (29), ZH: 0xE020-0xE04A (43), KO: 0xE04B-0xE052 (8)
ES/PT: 0xE054-0xE055 (2), FR: 0xE056-0xE058 (3), SV: 0xE059-0xE061 (9)
1.2 G2P エンジン作成
新規作成: src/python/g2p/piper_plus_g2p/$ARGUMENTS.py
必須クラス:
class [Lang]Phonemizer(Phonemizer):
def phonemize(self, text: str) -> list[str]: ...
def phonemize_with_prosody(self, text: str) -> tuple[list[str], list[ProsodyInfo | None]]: ...
def get_phoneme_id_map(self) -> dict[str, list[int]] | None:
return None # multilingual id_map を使用
G2P パイプライン (言語に応じて調整):
- テキスト正規化 (NFC + lowercase)
- トークン化 (単語/句読点分離)
- 辞書ルックアップ (オプション)
- 借用語ルール (接尾辞検出)
- ネイティブ音素変換 (子音 + 母音)
- 後処理 (同化、ストレスマーカー)
Prosody: a1=0, a2=stress(0/1/2), a3=word_phoneme_count
1.3 レジストリ + 多言語統合
修正: src/python/g2p/piper_plus_g2p/registry.py
try:
from .$ARGUMENTS import [Lang]Phonemizer
register_language("$ARGUMENTS", [Lang]Phonemizer())
except ImportError:
pass
- ラテン文字言語なら
latin_langsにも追加
修正: src/python/g2p/piper_plus_g2p/encode/id_maps.py
# Add the language inventory to the shared map and update
# `get_phoneme_id_map()` in encode/id_maps.py.
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3d ago Changed · -1 lines 48889d423550
- 14d ago Changed · -6 lines 142f48747478
- 2mo ago First seen · 239 lines · 0 tokens per session scan A 75485312e402
add-language is a command published in the GitHub repository ayutaz/piper-plus (239 stars, last pushed today), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 2,774 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other commands, from other repositories
translate
Adapt an English social post to Portuguese (PT) and Spanish (ES). Native-language adaptation — not translation. Preserves all data points and named entities.
translation-review
A command for systematically reviewing translated project files against the original version, including focused checks, quality scoring, and release verification.
translate-docs
Translate CodexSpec repository READMEs or site documentation with shared terminology and fidelity checks.
setup_research_plan
Set up or start a research project.
plan-localization
Plan localisation covering extraction, translation workflow, and the layout and format issues that follow.
hypothesis
Generate hypotheses and define how to test them.