/install g-tts
\r \r
Google Chirp 3 HD TTS Skill\r
\r
Overview\r
\r Generate ultra-realistic, human-like speech using Google's latest Chirp 3 HD generative models. This skill handles its own dependencies locally to remain portable.\r \r
Security Note: On first execution, this skill will run
npm installlocally within its own folder to fetch the official@google-cloud/text-to-speechlibrary from the public npm registry.\r \r ---\r \r
Trigger Detection\r
\r Recognize keywords like "tts", "speak", "voice", or "read this out loud" as TTS requests.\r
- Action: Extract the target text, strip the trigger keyword, apply "Natural Speech" formatting (see below), then call the tool using the auto-run logic below.\r \r ---\r \r
Auto-Run Logic (Agent Instructions)\r
\r
Follow these steps every time TTS is needed. Never assume gtts is in PATH — always run via node directly.\r
\r
Step 1 — Find the skill folder\r
gtts.js lives in the same folder as this SKILL.md. Resolve that path:\r
\r
SKILL_DIR="$(cd "$(dirname "$0")" && pwd)"\r
```\r
\r
### Step 2 — Check Node.js (Version 18+ Required)\r
\r
```bash\r
if ! command -v node &>/dev/null; then\r
echo "ERROR: Node.js is not installed."\r
exit 1\r
fi\r
\r
NODE_MAJOR=$(node -v | cut -d'v' -f2 | cut -d'.' -f1)\r
if [ "$NODE_MAJOR" -lt 18 ]; then\r
echo "ERROR: Node.js 18 or higher is required for Google Chirp 3 HD."\r
exit 1\r
fi\r
```\r
\r
### Step 3 — Auto-install dependency if missing\r
This installs the package **locally inside the skill folder** only.\r
\r
```bash\r
if [ ! -d "$SKILL_DIR/node_modules/@google-cloud/text-to-speech" ]; then\r
npm install @google-cloud/text-to-speech --prefix "$SKILL_DIR" --silent\r
fi\r
```\r
\r
### Step 4 — Run the script\r
\r
```bash\r
node "$SKILL_DIR/gtts.js" --text "$TEXT" --voice "$VOICE" --out "$OUTFILE"\r
```\r
\r
---\r
\r
## Command Arguments\r
\r
| Argument | Description | Default |\r
| :--- | :--- | :--- |\r
| `--text` | Text to synthesize. Supports `[pause]` tags. | *(required)* |\r
| `--voice` | Voice short-name (e.g. Aoede, Charon, Puck) | `Aoede` |\r
| `--out` | Output filename (saved to $OPENCLAW_WORKSPACE) | `output.mp3` |\r
\r
Returns `SUCCESS:/absolute/path/to/file.mp3` on success, or `ERROR: ...` on failure.\r
\r
---\r
\r
## Voice Selection\r
\r
| Gender | Recommended HD Voices |\r
| :--- | :--- |\r
| **Female** | Achernar (Default), Aoede, Leda, Kore, Zephyr, Despina, Gacrux, Vindemiatrix |\r
| **Male** | Charon, Puck, Fenrir, Orus, Achird, Algenib, Enceladus |\r
\r
---\r
\r
## Prompt Engineering for Natural Speech\r
\r
### 1. Pause Tags\r
Converted automatically into SSML `\x3Cbreak>` tags:\r
\r
| Tag | Duration |\r
| :--- | :--- |\r
| `[pause short]` | 300ms |\r
| `[pause]` | 600ms |\r
| `[pause long]` | 900ms |\r
\r
### 2. Human-Like Formatting\r
- **Contractions**: Use "I'm", "don't", "can't" for a conversational tone.\r
- **Ellipses**: Use `...` for trailing hesitation.\r
- **Fillers**: Use "Well,", "Um,", or "So," to mimic natural thought.\r
\r
---\r
\r
## Authentication\r
\r
Uses **Google Application Default Credentials (ADC)**. One-time setup:\r
\r
```bash\r
gcloud auth application-default login\r
```\r
\r
---\r
\r
## Requirements\r
\r
| Requirement | Status |\r
| :--- | :--- |\r
| Node.js 18+ | ❌ Must be installed on system |\r
| OPENCLAW_WORKSPACE | ℹ️ Optional (Defaults to current dir) |\r
| `@google-cloud/text-to-speech` | ✅ Auto-installed locally in skill folder |\r
| Google Cloud SDK + ADC login | ❌ One-time manual step required |\r
\r
---\r
\r
## Workflow\r
\r
1. **Detect Intent** — Identify a TTS trigger keyword.\r
2. **Format Text** — Apply contractions, ellipses, and `[pause]` tags.\r
3. **Check Environment** — Confirm `node` (18+) is available and `OPENCLAW_WORKSPACE` is known.\r
4. **Auto-install deps** — Run Step 3 if `node_modules` is missing.\r
5. **Execute** — `node "$SKILL_DIR/gtts.js" --text "..." --voice "..." --out "..."`\r
6. **Confirm Output** — Reference the `SUCCESS:` path and confirm to the user.\r
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install g-tts - 安装完成后,直接呼叫该 Skill 的名称或使用
/g-tts触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Google Chirp 3 HD TTS Skill 是什么?
High-definition generative speech synthesis using Google Cloud Chirp 3 HD voices. Delivers superior realism, emotional expressiveness, and natural pacing usi... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 109 次。
如何安装 Google Chirp 3 HD TTS Skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install g-tts」即可一键安装,无需额外配置。
Google Chirp 3 HD TTS Skill 是免费的吗?
是的,Google Chirp 3 HD TTS Skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Google Chirp 3 HD TTS Skill 支持哪些平台?
Google Chirp 3 HD TTS Skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Google Chirp 3 HD TTS Skill?
由 jarar21(@jarar21)开发并维护,当前版本 v1.0.2。