Community编程与开发github.com

sag

使用 ElevenLabs 文本转语音(TTS)工具,提供类似 Mac 系统 `say` 命令的用户体验。

sag 是什么?

`sag` 是一个命令行工具,它将 ElevenLabs 强大的文本转语音服务封装成一个简洁易用的界面,模仿了 macOS 中 `say` 命令的操作风格。对于 AI 代理(如 Claude Code、Cursor 或 Codex 等)而言,它是一个理想的语音输出工具,当用户要求“用语音回复”时,可以快速生成高质量的音频文件。它支持多种模型(如 expressive 的 `eleven_v3`、稳定的 `eleven_multilingual_v2` 和快速的 `eleven_flash_v2_5`),并提供丰富的控制选项,包括发音优化(重拼、大小写调整)、语言偏好设置、以及音效标签(如低语、大笑、唱歌等),以生成带有表现力的语音。用户可以通过环境变量或命令行参数轻松配置 API 密钥和默认语音 ID。该工具还会在音频生成后,通过 `MEDIA:` 语法将音频文件路径添加到回复中,方便 AI 代理直接将音频内容嵌入对话。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/clawdbot/clawdbot/tree/main/skills/sag

Installed? Explore more 编程与开发 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

sag 是做什么的?

使用 sag 通过 ElevenLabs 进行文本转语音(TTS)并在本地播放。

API 密钥(必需)

  • ELEVENLABS_API_KEY(首选)
  • SAG_API_KEY 也可被 CLI 支持
  • 密钥文件可通过 --api-key-file、ELEVENLABS_API_KEY_FILE 或 SAG_API_KEY_FILE 指定

快速开始

  • sag "Hello there"
  • sag speak -v "Roger" "Hello"
  • sag voices
  • sag prompting(模型特定提示)

模型说明

  • 默认:eleven_v3(富有表现力)
  • 稳定:eleven_multilingual_v2
  • 快速:eleven_flash_v2_5

发音与表达规则

  • 首要修正:重拼(例如“key-note”)、添加连字符、调整大小写。
  • 数字/单位/URL:--normalize auto(如果对名称有负面影响则使用 off)。
  • 语言偏好:--lang en|de|fr|... 用于指导规范化。
  • v3:不支持 SSML <break>;请使用 [pause]、[short pause]、[long pause]。
  • v2/v2.5:支持 SSML <break time="1.5s" />;<phoneme> 未在 sag 中暴露。

v3 音频标签(放在行首)

  • [whispers]、[shouts]、[sings]
  • [laughs]、[starts laughing]、[sighs]、[exhales]
  • [sarcastic]、[curious]、[excited]、[crying]、[mischievously]
  • 示例:sag "[whispers] keep this quiet. [short pause] ok?"

默认语音

  • ELEVENLABS_VOICE_ID 或 SAG_VOICE_ID

在生成长文本前,请先确认语音和朗读者。

聊天语音回复

当用户要求“语音”回复时(例如“疯狂科学家嗓音”、“用语音解释”),生成音频并发送:

# 生成音频文件
sag -v Clawd -o /tmp/voice-reply.mp3 "Your message here"

# 然后在回复中包含:
# MEDIA:/tmp/voice-reply.mp3

语音角色提示:

  • 疯狂科学家:使用 [excited] 标签、戏剧性的停顿 [short pause],变化强度
  • 镇静:使用 [whispers] 或较慢的语速
  • 戏剧化:适度使用 [sings] 或 [shouts]

Clawd 的默认语音 ID:lj2rcrvANS3gaWWnczSX(或直接使用 -v Clawd)

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

acp-router

Route plain-language requests for Claude Code, Cursor, Copilot, OpenClaw ACP, OpenCode, Gemini CLI, Qwen, Kiro, Kimi, iFlow, Factory Droid, Kilocode, or explicit ACP harness work into either OpenClaw ACP runtime sessions or direct acpx-driven sessions ("telephone game" flow). For coding-agent thread requests, read this skill first, then use only `sessions_spawn` for thread creation. Codex chat binding defaults to the native Codex app-server plugin unless ACP is explicit or background spawn needs ACP.

add-model-provider

Add and live-prove a model provider with non-interactive config one-liners, without exposing credentials.

agent-transcript

Requested GitHub PR/issue agent transcripts: redact, trim, preview, and insert safely.

apple-notes

Create, view, edit, delete, search, move, or export Apple Notes via the memo CLI on macOS.

apple-reminders

List, add, edit, complete, or delete Apple Reminders and reminder lists via remindctl.

auto-qa

Run OpenClaw-wide autonomous QA and live/stress campaigns across independent subsystem lanes, with verified fixes and a resumable evidence report.

autoreview

Structured code review through the shared OpenClaw agent-skills installation.

bear-notes

Create, search, and manage Bear notes via grizzly CLI.

blacksmith-testbox

Run Blacksmith Testbox for CI-parity checks, secrets, hosted services, migrations, or builds local cannot reproduce.

block-kit

Use proactively for structured or interactive Slack replies, and when asked to author or validate native Slack Block Kit JSON.

blogwatcher

Monitor blogs and RSS/Atom feeds for updates using the blogwatcher CLI.

blucli

BluOS CLI (blu) for discovery, playback, grouping, and volume.

bluebubbles

Send and manage iMessages via BlueBubbles, including attachments, tapbacks, edits, replies, and groups.

browser-automation

Use when controlling web pages with the OpenClaw browser tool, especially multi-step flows, login checks, tab management, or recovery from stale refs/timeouts.

camsnap

Capture frames or clips from RTSP/ONVIF cameras and local webcams, including USB pan/tilt/zoom control.

canvas

Present HTML on connected OpenClaw node canvases, navigate/eval/snapshot, and debug canvas host URLs.

channel-message-flows

Use when running QA Lab channel message flow evidence.

clawdtributor

Clawtributor PRs here, last week or another window: discover conversation refs, recheck GitHub, rank by impact.

clawhub

Search ClawHub for plugins by default, or skills when explicitly requested; install, verify, update, uninstall, publish, or sync skills.

相关技能